asp.net - How to read in a Bit field to create a checkbox -
i have field in sql database bit field.
i want read in field. if 1 checkbox true, else false.
i started off code, getting error. advice on how this?
if (myreader["tarchive"] == 1)
regards tea
try this:
mycheckbox.checked = convert.toboolean(myreader["tarchive"]);
Comments
Post a Comment