弹出对话框并发生页面跳转
1 public void MsgBox1(string _Msg, string URL)
2 {
3 string StrScript;
4 StrScript = ("<script language=javascript>");
5 StrScript += "var retValue=window.confirm('" + _Msg + "');" + "if(retValue){window.location='" + URL + "';}";
6 StrScript += ("</script>");
7 System.Web.HttpContext.Current.Response.Write(StrScript);
8 }
2 {
3 string StrScript;
4 StrScript = ("<script language=javascript>");
5 StrScript += "var retValue=window.confirm('" + _Msg + "');" + "if(retValue){window.location='" + URL + "';}";
6 StrScript += ("</script>");
7 System.Web.HttpContext.Current.Response.Write(StrScript);
8 }