Popup in gridview

Create a button in Gridiview set command name and command argument.

protected void grvViewInquiry_RowCommand(

object sender, GridViewCommandEventArgs e)
{
if (e.CommandName == “Detail”)
{
int AppealId = Convert.ToInt32(e.CommandArgument.ToString());
string script = “window.open(‘ViewInquiryDetails.aspx?InqID=” + AppealId + “‘, ”,’width=800, height=500,top=130,left=90,resizable=yes’);”;
ScriptManager.RegisterStartupScript(this.Page, this.Page.GetType(), “Print”, script, true);
}
else if (e.CommandName == “Drawing”)
{
Response.Redirect(“ViewDrawings.aspx?InqID=” + Convert.ToString(e.CommandArgument));
}
}
Share