我想在按钮单击时在现有表名“ table1”运行时添加行,并在td单元格中使用asp.net c#而不是jquery添加动态文本框。
Random random = new Random();
int m = 2;
Label lbl1 = new Label();
lbl1.ID = "SN" + random.Next();
lbl1.Text = Convert.ToString(++m) + ".";
tb.Controls.Add(lbl1);
tRow.Controls.Add(tb);
for (int i = 1; i < 6; i++)
{
HtmlTableCell tb1 = new HtmlTableCell();
Random random1 = new Random();
TextBox txt = new TextBox();
txt.ID = "budget" + random1.Next();
tb1.Controls.Add(txt);
tRow.Controls.Add(tb1);
}
Table1.Rows.Add(tRow);