Skip to main content

Jquery and CheckboxList

In this post i am going to show you how use jquery in to select the checkbox of Checkbox List
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="RadioButtonListJquery.aspx.cs"
    Inherits="RadioButtonListJquery" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="">
<head runat="server">
    <script src="Scripts/jquery-1.3.2.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            $("#selectAll").click(function () {
                $("input[type='checkbox'").not("#selectAll").each(function () {
                    $(this).attr("checked", "true");

    <form id="form1" runat="server">
    <input type="button" value="Select All" id="selectAll" />
    <div id="divLanguage">
        <asp:CheckBoxList ID="chkList" runat="server">
            <asp:ListItem Text="C#" Value="1"></asp:ListItem>
            <asp:ListItem Text="Java" Value="1"></asp:ListItem>
            <asp:ListItem Text="C++" Value="1"></asp:ListItem>
            <asp:ListItem Text="C" Value="1"></asp:ListItem>


Popular posts from this blog