All,
i have a bunch of dynamic checkboxes created in a datagrid, and i have the results going to a database when they are checked. question is how do i count the total # of checkboxes checked. here is the code i have that loops through the checkboxes to submit to the db.
foreach (DataGridItem spriden_ID in dgEmployees.Items)
{
CheckBox cbSpriden = (CheckBox) spriden_ID.FindControl("cbSpriden");
if (cbSpriden.Checked)
{
//Stuff to add to db here
}
else
{
lblStatus.Text ="Scheduling failed: " + addCourses.ErrorMessage;
}
}
Once the update to the DB succeeds i want to display the count of all the checkboxes submitted..how would i do this?? thanks in advance for any help.