for(int i=0;i<rows;i++)
{
TableRow tr=new TableRow();
TableCell tc5=new TableCell();
tc5.Text=Convert.ToString(i+1);
tr.Cells.Add(tc5);
for(int j=0;j<3;j++)
{
TableCell tc6=new TableCell();
System.Web.UI.WebControls.TextBox tx = new TextBox();
tc6.Controls.Add(tx);
tr.Cells.Add(tc6);
table.Rows.Add(tr);
}
}
this.FindControl("Table1").FindControl("Panel1").Controls.Add(table); 我想获取动态创建的TextBox的值.
如何获取?
{
TableRow tr=new TableRow();
TableCell tc5=new TableCell();
tc5.Text=Convert.ToString(i+1);
tr.Cells.Add(tc5);
for(int j=0;j<3;j++)
{
TableCell tc6=new TableCell();
System.Web.UI.WebControls.TextBox tx = new TextBox();
tc6.Controls.Add(tx);
tr.Cells.Add(tc6);
table.Rows.Add(tr);
}
}
this.FindControl("Table1").FindControl("Panel1").Controls.Add(table); 我想获取动态创建的TextBox的值.
如何获取?
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货