Asp.net programming we consider all important topic for knowledge about controls,web Services, JSON, Ajax, database, and interview related Question. In this Asp.net and sql server tutorial blog we give many examples of jquery as like How Play YouTube Video in Your Asp.net Website by URL, How to Play YouTube Videos in Asp.net by using Jquery , Jquery Change div background on mouseover in asp.net , JQuery UI Datepicker (Calendar) etc.

Friday, August 22, 2014

Check Uncheck all html CheckBox controls using jQuery:

Check Uncheck all html CheckBox using jQuery:



In this post we describe select checkbox in asp.net using jquery. here we take two list and  use jquery code.  


CheckBox using jQuery:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <style type="text/css">
        body
        {
            font-family: Calibri;
            font-size: 12pt;
            padding: 10px;
        }
    </style>
    <script type="text/jscript">
        $(document).ready(function () {
            $("input[name='tech']").filter(':even').attr('disabled', true);
            $("input[name='hobbies']").filter(':odd').attr('disabled', true);
        });
    </script>
</head>
<body>
    <div align="center">
    <h1>Checkbox in asp.net using Jquery: </h1>
    <div align="left" style="width:400px; border:2"  >
        <b>1st Checkbox List: </b>
        <br />
        <input type="checkbox" name="tech" value="jQuery" />jQuery
        <br />
        <input type="checkbox" name="tech" value="JavaScript" />JavaScript
        <br />
        <input type="checkbox" name="tech" value="Prototype" />Prototype
        <br />
        <input type="checkbox" name="tech" value="Dojo" />Dojo
        <br />
        <input type="checkbox" name="tech" value="Mootools" />Mootools
        <br />
        <br />
        <b>2nd Checkbox List: </b>
        <br />
        <input type="checkbox" name="hobbies" value="Sports" />Sports
        <br />
        <input type="checkbox" name="hobbies" value="Racing" />Racing
        <br />
        <input type="checkbox" name="hobbies" value="Singing" />Singing
        <br />
        <input type="checkbox" name="hobbies" value="Writing" />Writing
        <br />
        <input type="checkbox" name="hobbies" value="Travelling" />Travelling
        <br />
        <input type="checkbox" name="hobbies" value="Cooking" />Cooking
        <br />
    </div>   
    </div>
</body>
</html>
Check Uncheck all html CheckBox controls using jQuery:
Add caption


Other asp.net checkbox related post:


·         Check box in ASP.NET GridView

Other Asp.net related Post:

No comments:

Post a Comment