select checkboxlist based on to database data
foreach(datarow in the query result)
{
ListItem currentCheckBox = CheckBoxListABC.Items.FindByValue(datarow ["TheFieldName"].ToString());
if (currentCheckBox != null)
{
currentCheckBox.Selected = true;
}
}
No comments:
Post a Comment