the code written below displays the text box for a certain condition.But when i click another unrelated button or link it dissapears.i need it to stay visible when i do other activities on the webpage
protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
{
TextBox new_textbox = new TextBox();
if (DropDownList1.Text.Equals("OFF"))
{
new_textbox.ID = "txt" + 1;
PlaceHolder1.Controls.Add(new_textbox);
Label5.Visible = true;
new_textbox.Visible = true;
}
else
{
Label5.Visible = false;
}
}