Here is what I have so far.
//Getting access value from the AccessTable
SqlCommand cmadAccess;
string strAccess;
strAccess = "select * from AccessTable where Email='" +
EmailTextBox.Text.Trim() + "'";
cmadAccess = new SqlCommand(strAccess, conn);
SqlDataReader readAccess = cmadAccess.ExecuteReader();
if (readAccess.Read()) {
//here I am trying to display data from the database to the checkbox but it does not work.
}
These are two examples of what I have tried:
TechnitianCheckBox.Checked = Convert.ToBoolean(readAccess["ClientTechnitian"]);
TechnitianCheckBox.Checked = readAccess["ClientTechnitian"].ToString();
Can anyone indicate the correct way to do this?