SiteMap  | About    

Checkbox Control

CheckBoxes allow the user to make multiple selections from a number of options and CheckBoxes comes with a caption, which you can set in the Text property.


  CheckBox1.Text = "CheckBox"


  CheckBox1.Text = "CheckBox";

We can decide whether the checkbox is clicked or not by its checked property.
  If CheckBox1.Checked = True Then
    Label2.Text = "Checkbox Clicked "

End If

  if (CheckBox1.Checked == true)
    Label2.Text = "Checkbox Clicked";


The following ASP.Net program detect whether the Checkbox is clicked or not and display the message on Label control.



<html xmlns="">
<head id="Head1" runat="server">
	<title>Untitled Page</title>
	<form id="form1" runat="server">
		<asp:CheckBox ID="CheckBox1" runat="server" Text="CheckBox"
			AutoPostBack="True"  oncheckedchanged="CheckBox1_CheckedChanged" />
	   <br />
		<asp:Label ID="Label2" runat="server" Text="Label2"></asp:Label>

Click the following links to see full source code

C# Source Code
VB.NET Source Code
default.aspx.vb (C) 2018    Founded by raps mk
All Rights Reserved. All other trademarks are property of their respective owners.