I am adding 2 controls Checkbox1 and Textbox1 dynamically. Textbox1 has been disabled by default. I want to enable Textbox1 if checkbox1 is checked. Thanks in Advance.
Praveen
Your code with both controls, should be something like:
protected void CheckBox1_CheckedChanged(object sender, EventArgs e)
{
if (CheckBox1.Checked)
TextBox1.Enabled = true;
else
TextBox1.Enabled = false;
}
TextBox1.Enabled = TextBox1.Enabled;