写了个Button的Click事件处理程序
```protected void bntLook_Click(object sender, EventArgs e)
{
Button btnLook = sender as Button;
GridViewRow gr = btnLook.Parent.Parent as GridViewRow;//这里报错
Response.Redirect("Information.aspx?labID = " + gr.Cells[1].ToString());
return;
}
这是怎么回事
bntLook和gr是null
我按照这上面写的http://www.cnblogs.com/jy02414216/archive/2012/08/10/2633086.html
看看是不是这个对象有问题,加断点调试看看吧
btnLook.Parent.Parent