Hi
I have a dropdown list,i a m binding values to it from the database.my requirment is i have the change the color of values in dropdown .for this i wrote a loop as
foreach (var item in DropDownList1.Items.Cast<ListItem>().Where(li => li.Value.StartsWith("C", StringComparison.OrdinalIgnoreCase)))
{
item.Attributes.CssStyle.Add("color", "red");
}
but i am not getting any colors the items in dropdown .where should i write this code,whether it should be separate function or after binding data to dropdown.help me in this issue
vijaya