关于asp.net中gridview的问题,关于footer,16aspx上下的英语交流网程序,管理员的添加和修改有问题

css部分 这是添加用户的方法 但是A.AdminName 和后面的A.取到的都是空值protected void GridView1_RowCommand(object sender,GridViewCommandEventArgs e)
{if (e.CommandName == "Insert")
{ Admins A = new Admins();
var footer = ((GridView)sender).FooterRow;
A.AdminName = ((TextBox)footer.Cells[1].FindControl("txtnewname")).Text;
A.Password = FormsAuthentication.HashPasswordForStoringInConfigFile(((TextBox)footer.Cells[1].FindControl("txtnewPwd")).Text, "MD5");
A.AdminType = ((TextBox)footer.Cells[1].FindControl("txtAdminNewType")).Text;
A.State = true;
AC.AddAdmin(A);
BindAdmin(); }}收起
在线等 需要aspx程序部分可以直接联系我


var footer = ((GridView)sender).FooterRow;
这个是不是有问题 又 不是js 竟然var 声明变量
原文地址:https://www.cnblogs.com/amomzk/p/7015864.html