hi guys i am using asp.net and i want create dynamical textbox in my asp page i added bottun calld(add) ,bottun calld(Button1) which will print my result and label here is my code
protected void Add_Click(object sender, EventArgs e)
{
TextBox []t = new TextBox[5];
for (int i = 0; i < 5; i++)
{
t[i] = new TextBox();
t[i].ID = "t" + i.ToString();
Form.Controls.Add(t[i]);
}
}
protected void Button1_Click(object sender, EventArgs e)
{
string str = "";
for(int i = 0;i<5;i++)
{
TextBox t = (TextBox)Form.FindControl("t"+i.ToString());
if (t != null)
{
str += t.Text.ToString();
}
else
{
...
Go to the complete details ...