1, Response.Write
("<script>alert (' query statement execution Error! ');window.location.href=displaydata.aspx</script> ");
2, Page.registerstartupscript ("msg", "<script>alert" query statement execution Error! '); window.location.href= ' displaydata.aspx ' </script> ");
General background Pop-up prompt box, are used Page.registerstartupscript, do not Response.Write
3, Clientscript.registerstartupscript (this. GetType (), "", "<script lanuage=javascript> alert ('); location.href= ';</script>");
4, System.Web.HttpContext.Current.Response.Write (String.Format ("<script language=\" javascript\ ">alert (\" {0 }\ "); Window.location.replace (\" {1}\ ") </script>", strmessage, Strredirecturl));
5, Scriptmanager.registerstartupscript (this, this. GetType (), "U1", "Alert (' Content! ') ", true);
6, Page.ClientScript.RegisterStartupScript (this. GetType (), "D", "alert (' Please login first!") '); Location= '. /login.aspx '; ", true);
This article is from the "Program Ape" blog, please be sure to keep this source http://haihuiwei.blog.51cto.com/4789207/1585186
Pop-up Prompt box before the ASP page code jump