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 :
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>