The problem with your current code is that you're trying to loop through the items, and not the SQL. What you want to do is loop through the SQL, and then match up your Checkbox ListItem ( checkedlistbox.FindByValue( mysqldatareader.Item("id") ), and then set the .Checked property to the value of what you get out of the database.
|