Select all in CheckBoxList

liunx

Guest
Hi

I have an asp:CheckBoxList that is populated by a stored procedure. All is fine there, the data is returned and the asp:CheckBoxList is populated. However, I have created a button that when clicked has to select all the CheckBoxes in the CheckBoxList. Does anyone know how to do this please?

Thanks.

AJNTry something like this on the click event of the button:

Private Sub btnCheckBoxes(byval sender as object, byval e as eventargs) Handles btnCheckBoxes.Click
For Each listItem As ListItem In myCheckboxList.Items
listItem.Checked = True
Next
End SubThanks Cstick, looks like what I'm after.

AJN
 
Back
Top