Hi neda,
Please try the following way,
1) set ForeColor property to color of your wish as
<asp:DropDownList runat="server" ID="ddl1" ForeColor="Red">
<asp:ListItem Text="Solid State Physics" />
<asp:ListItem Text="Electronics" />
<asp:ListItem Text="Nuclear Physics" />
<asp:ListItem Text="The Theary of Relativity" />
</asp:DropDownList>
and in page load do like
protected void Page_Load(object sender, EventArgs e)
{
if (!this.IsPostBack)
{
foreach (ListItem item in ddl1.Items)
{
item.Attributes.CssStyle.Add("color", "black");
}
}
}
I suggest you to first try this snippet on some fresh page and dont direcly implement on your page,
thanks and Regards,
Rk_Hirpara