Hi,
the below code is for dynamically adding textbox, but it will adding for same textbox only my requirement is how many times i click add button such times textbox will add
for ex: if i click 10 times add button 10 textboxs will add
[CODE=CPP]
Session["TextBoxCou nt"] = "3";
for (int a = 0; a < int.Parse(Sessi on["TextBoxCou nt"].ToString()); a++)
{
TableRow tr = new TableRow();
TableCell tc = new TableCell();
TextBox tb = new TextBox();
tb.Attributes.A dd("runat", "Server");
tb.EnableViewSt ate = false;
tb.MaxLength = 128;
tb.ID = "TextBox" + a;
tc.Controls.Add (tb);
tr.Cells.Add(tc );
ctrlTable.Rows. Add(tr);[/CODE]
the below code is for dynamically adding textbox, but it will adding for same textbox only my requirement is how many times i click add button such times textbox will add
for ex: if i click 10 times add button 10 textboxs will add
[CODE=CPP]
Session["TextBoxCou nt"] = "3";
for (int a = 0; a < int.Parse(Sessi on["TextBoxCou nt"].ToString()); a++)
{
TableRow tr = new TableRow();
TableCell tc = new TableCell();
TextBox tb = new TextBox();
tb.Attributes.A dd("runat", "Server");
tb.EnableViewSt ate = false;
tb.MaxLength = 128;
tb.ID = "TextBox" + a;
tc.Controls.Add (tb);
tr.Cells.Add(tc );
ctrlTable.Rows. Add(tr);[/CODE]
Comment