protected void ImageButton_enable_Click(object sender, ImageClickEventArgs e)
{
foreach(GridViewRow gvrow in GridView_enable.Rows)
{
CheckBox chk1=(CheckBox) gvrow.FindControl("CheckBox_select");
if (chk1.Checked == true)
{
Label lblEmail = (Label)gvrow.FindControl("Label1");
string email = lblEmail.Text;
}
}
}
我的代码有什么问题?我收到此错误“对象引用未设置为对象的实例”。