Tuesday, September 20, 2011

Select checkboxlist according to db get values

This is very simple example for splitting and selecting checkbox list according to the values get by database field.
string[] value = DocValues.Split(',');

foreach (string st in value)
{
if (chkdocument.Items.FindByText(st).Text != string.Empty)
{
chkdocument.Items.FindByText(st).Selected = true;
}
}

No comments:

Post a Comment