I am returning records from the database and I need to compare those records against my checklist box to determine which ones should be checked.
Query is working properly and returning 3 records.
Vehicle ID = 40, Option ID = 1
VehicleID = 40, Option ID = 36
VehicleID = 40, Option ID = 37
foreach (ListItem item in chkAirCondition.Items)
{
if (item.Value == Convert.ToString(OptAdr["OptionID"])))
{
chkAirbags.SelectedValue = dr["OptionID"].ToString();
}
}
This is not working, can anyone point me in the right direction???
...
Go to the complete details ...