Bind CheckBoxList Using Comma Seprated Value
Bind CheckBoxList Using Comma Seprated Value
string FinancialType = "1,2,3" ;
string[] Items = FinancialType.Split(',');
foreach (ListItem item in cblFOList.Items)
{
item.Selected = Items.Where(c =>
c.Equals(item.Value)).FirstOrDefault() != null;
}
Comments
Post a Comment