Hi, i have this code that every time i click the button it creates a text box, how can i do this more than one time? thanks Code: private void button1_Click(object sender, EventArgs e) { TextBox myText = new TextBox(); myText.Text = ""; this.Controls.Add(myText); }
Hi, You can check this Code: TextBox tb; static int i = 0; protected void addnewtext_Click(object sender, EventArgs e) { i++; for(j=0;j<=i;j++) { tb = new TextBox(); tb.ID = j.ToString(); PlaceHolder1.Controls.Add(tb); } } Thanks