Check CheckBox Status in ASP.Net using JQuery

In this asp.net post we will learn how to check status of checkbox control using JQuery.

First, Download JQuery library from http://jquery.com. and include in web page at head section.

Design the ASP.Net web form with one Button and one CheckBox control.

The ASP.Net web page design is :

Check Status of CheckBox using JQuery
Check Status of CheckBox using JQuery

Write below JQuery code at head section in aspx page.

<head runat=”server”>
<title>JQuery in ASP.Net</title>
<script src=”jquery-1.4.3.min.js” type=”text/javascript”></script>
<script>
$(document).ready(function() {
$(“#Button1”).click(function() {
alert($(‘#<%=CheckBox1.ClientID%>’).attr(‘checked’));
});
});
</script>
</head>

Check Status of CheckBox using JQuery
Check Status of CheckBox using JQuery
Check Status of CheckBox using JQuery
Check Status of CheckBox using JQuery
Check Status of CheckBox using JQuery
Check Status of CheckBox using JQuery

Leave a Reply

Your email address will not be published. Required fields are marked *