Hi,
"Gidi" <sh*****@hotmail.com.dontspamwrote in message
news:EC**********************************@microsof t.com...
Hi,
I've a webPage, which has a checkbox.
i want that when the checkbox is checked, a textbox will be created and
showen under the checkbox.
How can i do it?
My suggestion is that the Textbox be always there, just invisible ( using
Textbox.Visible = false;)
so when the checkbox is checked you change it to visible
like this:
<asp:CheckBox runat="Server" ID="ChangeLocationCHK" Checked="false"
AutoPostBack="true"
OnCheckedChanged="ChangeLocation_Checked"
Text="Change Agent Location" />
<asp:TextBox runat="Server" ID="NewCodeTXT" visible="false"></asp:TextBox>
in the code behind:
protected void ChangeLocation_Checked(object sender, EventArgs e)
{
NewCodeTXT.Visible = ChangeLocationCHK.Checked;
}