Check/Uncheck all Items in an ASP.NET CheckBox List using jQuery

Suprotim Agarwal post a new article about ASP.NET aaand jQuery in which he shows how ton check or uncheck all checkboxes with jQuery. He writes:

The CheckBoxList control in ASP.NET provides a group of checkboxes that can be dynamically generated by binding it to a data source. A few months ago, I had written a similar article using ASP.NET and JavaScript over here Check/Uncheck all items in a CheckBoxList using ASP.NET and Javascript . The approach we had taken using JavaScript was, we first retrieved the checkboxlist control using document.getElementById(cbControl) and then counted the number of <input /> tags inside that control. Once we got the count, we used a loop to set the state of each control.

Source .NET Curry.

Comments

Are you human

You can use simple HTML-formatting tags(like <b>, <ul>, <code> and others)

Are you human
search engine optimisation
Advertise on this site

Live