How to clear all the selected Items from a Check Box List in asp.net 2.0?

How to clear all the selected Items from a Check Box List in asp.net 2.0?


Here is the sample code for doing this operation


for (int i = 0; i < chkSubCategories.Items.Count; i++)
{
chkSubCategories.Items[i].Selected = false;
}

No comments: