Hi
I am making countries as bold and states as normal and binding them to a dropdown,to do this iam using lambda expression,But My problem is after selecting one county all other countries are losing boldness.But i want to retain that boldness.Please help me in this issue
private void SetDropDownStyle()
{
foreach (var item in ddlcounstates.Items.Cast<ListItem>().Where(li => li.Value.StartsWith("C", StringComparison.OrdinalIgnoreCase)))
{
item.Attributes.CssStyle.Add("font-weight", "bold");
}
}
and binding query is
Select 'C'+Cast(countryID as varchar)id , CountryID as CountryID,CountryName from Countries UNION Select 'S'+Cast(stateID as varchar)stateID ,CountryID,StateName from [States] order by CountryID,ID
vijaya