<FooterTemplate>
<asp:TextBox ID="txtSName" runat="server" Text=""/>
</FooterTemplate>
代码隐藏代码如下:
TextBox txtName = (TextBox)(GridView1.FooterRow.FindControl("txtSName"));
string aa=txtName.Text;
每次aa
is null
.
我将这段代码放入以下内容中:
protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
{
}
请帮我..........
尝试这个代码它可能会工作:
protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
{
TextBox txtName = GridView1.FooterRow.FindControl("txtSName") as TextBox;
string aa = txtName.Text;
}
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)