I have a checkbox on a form:
<asp:CheckBox ID="CheckBox1" runat="server"
Visible="true" AutoPostBack="True" oncheckedchanged="CheckBox1_CheckedChanged" />
It is not firing the below event when I check or uncheck it.
protected void CheckBox1_CheckedChanged(object sender, EventArgs e)
{
if (CheckBox1.Checked)
{
preContactTextBox.Visible = true;
prePracticeCodeTextBox.Visible = true;
}
else
{
preContactTextBox.Visible = false;
prePracticeCodeTextBox.Visible = false;
}
}
It is not entering this event at all. What I am doing wrong?
here's the complete code:
How can I get it to fire the event?