asp.net 后台代码跳转页面前弹出提示框
2014-12-01 19:15
489 查看
1、Response.Write
("<script>alert('查询语句执行出错!');window.location.href=DisplayData.aspx</script>");
2、Page.RegisterStartupScript("msg", "<script>alert('查询语句执行出错!');window.location.href='DisplayData.aspx'</script>");
一般后台弹出提示框,都是用Page.RegisterStartupScript,不用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('内容!')", true);
6、Page.ClientScript.RegisterStartupScript(this.GetType(), "d", "alert('请先登录!');location='../login.aspx';", true);
("<script>alert('查询语句执行出错!');window.location.href=DisplayData.aspx</script>");
2、Page.RegisterStartupScript("msg", "<script>alert('查询语句执行出错!');window.location.href='DisplayData.aspx'</script>");
一般后台弹出提示框,都是用Page.RegisterStartupScript,不用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('内容!')", true);
6、Page.ClientScript.RegisterStartupScript(this.GetType(), "d", "alert('请先登录!');location='../login.aspx';", true);
相关文章推荐
- asp.net 后台代码跳转页面前弹出提示框【C#后台提示后调转页面大全
- asp.net 后台代码跳转页面前弹出提示框
- ASP.NET 弹出提示框,点击确定后跳转到另一个页面
- ASP.NET弹出提示点击确定之后再跳转页面的方法
- ASP.NET弹出提示点击确定之后再跳转页面的方法
- ASP.NET弹出提示点击确定之后再跳转页面的方法
- ASP.NET 的后台代码问题:动态向Table里添加按钮,却提示没有Text属性。
- 代码阅读总结之Fitch and Mather 7.0(asp.net发生异常或错误时错误提示页面的处理方法)
- ASP.NET Ajax实现弹出提示框,页面变灰不可点击
- [原创] ASP.NET 中如何弹出提示窗口然后导向另外一个页面
- 【asp.net 】使用js结合hidden控件实现在后台运行一段程序后提示确认,确认通过后继续执行后台代码~~~
- ASP.NET Ajax实现弹出提示框,页面变灰不可点击
- ASP.NET后台代码方式识别页面“按钮点击”和浏览器F5“刷新”事件
- asp.net 弹出窗口 单击确定和取消跳转到指定页面
- ASP.NET后台代码方式识别页面“按钮点击”和浏览器F5“刷新”事件
- ASP.NET Ajax实现弹出提示框,页面变灰不可点击
- asp.net弹出窗口代码大全---aspx页面弹出窗口代码大全(2)
- [ASP.NET]如何点击按钮弹出新窗口,输入数据后返回并刷新页面?(C#代码)
- Asp.Net下载页面,并弹出下载提示框
- ASP.NET页面中弹出提示框