在GridView中放ButtonField,设CommandName=comp_detail,
protected void GridView2_RowCommand(object sender, GridViewCommandEventArgs e)
{
if (e.CommandName.ToString().Equals("comp_detail"))
{
string comp_sys_id = GridView2.DataKeys[int.Parse(e.CommandArgument.ToString())]["comp_sys_id"].ToString();
string url = "comp_detail.aspx?comp_sys_id=" + comp_sys_id;
ScriptManager.RegisterStartupScript(this.UpdatePanel1, this.GetType(), "", "window.open('"+url+"','','width=700,height=500,top=100,left=200,scrollbars=yes');", true);
}
}