BillingEntity = (string)rdr["BillingEntity"];
string[] split = BillingEntity.Split(',');
for (int i = 0; i < split.Length; i++)
{
split[i] = split[i].Trim();
if (split[i] == "Clinic")
{
BillingEntityCheckBox.Items[i].Checked = true;
Session["billingEntitySessionVar"]Session["BillingEntitySessionVar"]
+ " Clinic";
}
This seems like a question that should have a really simple answer, but I've been struggling with it at work today. How can I check an item in a checkbox list from the underlying code? I know with a single checkbox you just use checkbox.checked = true. I had that working fine in my code but I need to link the checkboxes together in a control so that I can trigger an event based on whether any of them has been changed by the user. To give a little background I'm pulling in data from a SQL database and outputting to the user interface through a WebForm.
Aucun commentaire:
Enregistrer un commentaire