核心提示:C#网页执行结束后自动关闭网页的方法:(放在网页执行的尾部)StringBuilder sb = new StringBuilder();sb.Append('scriptwindow.opener=...
C#网页执行结束后自动关闭网页的方法:(放在网页执行的尾部)
StringBuilder sb = new StringBuilder();
sb.Append("<script>window.opener=null;window.open('', '_self', '');window.close();</script>");
ClientScript.RegisterStartupScript(this.GetType(), "LoadPicScript", sb.ToString());