asp:CheckBox
asp:Label
<asp:CheckBox ID="checkBox1" runat="server" OnCheckedChanged="checkBox1_CheckedChanged" Text="I agree" /><br /> <asp:Label ID="label1" runat="server" Text="Check the check box if you agree." />
CheckedChanged
protected void checkBox1_CheckedChanged(object sender, EventArgs e) { if (!IsPostBack) { if (checkBox1.Checked) { label1.Text = "You agree. Please click on the button to go to the next page."; } else { label1.Text = "Check the check box if you agree."; } } }
AutoPostback = true
OnCheckedChanged
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)