【发布时间】:2015-11-22 04:08:15
【问题描述】:
我有一个gridview,并在RowDataBound 事件中创建了动态TextBox
TextBox txtbox = new TextBox();
txtbox.ID = "txt1";
txtControl.Text = "SoomeValue";
当我尝试检索 button click 上的值时
TextBox textboxValue = (TextBox)gv.Rows[rowIndex].Cells[cellIndex].FindControl("txt1");
string value = textboxValue.Text;
它总是返回null,旁边有value
【问题讨论】:
标签: c# asp.net gridview dynamic