我正在使用以下代码:
protected void gvDetails_RowCreated(object sender, GridViewRowEventArgs e)
{
e.Row.Attributes["ondblclick"] = "location.href='CustomerInfo.aspx?page=0&Custid=" + Convert.ToString(e.Row.FindControl("hdfCust_Id")) + "'";
}
所以当我双击gridview时,它会将我重定向到下一页并给出错误。它给出的 Custid 值如下:
Custid=System.Web.UI.WebControls.HiddenField