i have a checkboxlist control
We will iterate through the checkboxlist and use a counter variable for counting selected items. For every item in checkboxlist we will add 1 to counter variable selCount if item is checked
int selCount = 0;
for(int i= 0; i< chklst.Items.Count; i++)
if(chklst.Items[i].Selected)
selCount++;
// Now selCount will contain the count of selected items