Tuesday, August 05, 2008

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: