Thursday, April 18, 2013

JQuery for a select all checkbox

So I have a asp.net repeater with a bunch of check boxes.  I want to have a select all/unselect all checckbox at the top of the repeater.

I used this little snippet of jquery to do it.

I got this great script from the bottom of a stack overflow post Here is a small revision on this, when doing this in asp.net with an ajax update panel you need to add the live. This way when the update panel refeshed the html, you can re-connect to your event.

No comments:

Post a Comment