How add one more control in TextBox Programatically
I wanto become a software developer
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Praveen DhatrikaPosted Jan 4, 2016, 11:54 AM
Your subject says different from body
How to add one more control in TextBox programatically.
.aspx code
.aspx.cs code
protected void Page_Load(object sender, EventArgs e)
{
TextBox TB = new TextBox();
TB.ID = "TB1";
PlaceHolder1.Controls.Add(TB);
TB.Visible = true;
}
protected void Button1_Click(object sender, EventArgs e)
{
if (TB.visible==false)
{
TB.visible==true;
}
else
{
TB.visible==false;
}
}