把Page_load()事件里面的btn.Attributes.Add("onclick", "opendialog('ShowDialog.aspx')");去掉
ClientScript.RegisterStartupScript(this.GetType(), "", "", true);
修改为:
ClientScript.RegisterStartupScript(this.GetType(), "aa", "opendialog(ShowDialog.aspx)
", true);试试...
把page_load里面的btn.Attributes.Add("onclick", "opendialog('ShowDialog.aspx')");
去掉,在响应事件里面直接写
this.ClientScript.RegisterStartupScript(this.GetType(),"1","");试试~~
直接在HTML里面就可以的