Retrieving CheckBoxList values in C#
Posted on 2010-09-09
Hello, I have the following code below that retireves values from my database that I would like to bind to the CheckBoxList control. However, I have a red line under the word "Information" that I can't seem to figure out. Please keep in mind that someone else gave me this code to use which is why i'm having issues.
// Check for CheckBox value if empty then the CheckBox is empty
foreach (DataRow Row in dtStudent.Rows)
if (!Information.IsDBNull(Row["testid"])) <------ Message on this line.,
cblTests.Items.FindByValue(Row["testid"].ToString()).Selected = true;