<%@ Page Language="VB" %>
<script runat="server">
Sub btnSubmit_OnClick(sender as Object, e As EventArgs)
IF Me.CheckBox1.Checked = True Then
Me.lblText1.Text = "CheckBox1 Checked"
Else
Me.lblText1.Text = "CheckBox1 Not Checked"
End IF
IF Me.CheckBox2.Checked = True Then
Me.lblText2.Text = "CheckBox2 Checked"
Else
Me.lblText2.Text = "CheckBox2 Not Checked"
End IF
End Sub
Sub CheckBox3_CheckedChanged(sender As Object, e As EventArgs) Handles CheckBox3.CheckedChanged
IF Me.CheckBox3.Checked = True Then
Me.lblText3.Text = "CheckBox3 Checked"
Else
Me.lblText3.Text = "CheckBox3 Not Checked"
End IF
End Sub
</script>
<html>
<head>
</head>
<body>
<form runat="server">
<asp:CheckBox id="CheckBox1" runat="server" Text="Option 1"></asp:CheckBox>
<asp:CheckBox id="CheckBox2" runat="server" Text="Option 2"></asp:CheckBox>
<asp:CheckBox id="CheckBox3" runat="server" Text="Option 3" AutoPostBack="True"></asp:CheckBox>
<br />
<br />
<asp:Button id="btnSubmit" onclick="btnSubmit_OnClick" runat="server" Text="Submit"></asp:Button>
<br />
<br />
<hr />
<asp:Label id="lblText1" runat="server"></asp:Label>
<br />
<asp:Label id="lblText2" runat="server"></asp:Label>
<br />
<asp:Label id="lblText3" runat="server"></asp:Label>
</form>
</body>
</html>