如何在用户定义的函数中找到对gridview的控制......这会抛出
DataSet ds = objSelectAll.Paging(PageSize, PageNumber, USERID, ROLEID);
if (Session["Username"].ToString() == "admin")
{
foreach (GridViewRow row in UserRoleGridView.Rows)
{
ImageButton ImgEditbtn = (ImageButton)row.FindControl("EditButton");
ImageButton ImgDelbtn = (ImageButton)row.FindControl("DeleteButton");
DataSet dsusr = objSelectAll.UserBasedPaging(PageSize, PageNumber, USERID, ROLEID);
UserRoleGridView.DataSource = dsusr.Tables[1];
UserRoleGridView.DataBind();
...