asp.net 后台代码跳转页面前弹出提示框【C#后台提示后调转页面大全
2013-12-22 19:01
856 查看
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 后台代码跳转页面前弹出提示框
- asp.net 后台代码跳转页面前弹出提示框
- ASP.NET弹出提示点击确定之后再跳转页面的方法
- ASP.NET弹出提示点击确定之后再跳转页面的方法
- C# ASP.NET中无刷新页面 弹出对话框,并且页面跳转
- asp.net的C#提示信息与页面跳转
- [ASP.NET]如何点击按钮弹出新窗口,输入数据后返回并刷新页面?(C#代码)
- C# ASP.NET中无刷新页面 弹出对话框,并且页面跳转
- ASP.NET弹出提示点击确定之后再跳转页面的方法
- asp.net 中为什么在showModalDialog弹出的窗体 用html 控件 刷新不了页面。而用服务器端控件 写C#代码可以刷新页面。但是用服务器端刷新页面不好。
- vs2008中asp.net的C#提示信息与页面跳转问题
- ASP.NET 弹出提示框,点击确定后跳转到另一个页面
- asp.net弹出窗口代码大全---aspx页面弹出窗口代码大全(1)
- asp.net弹出窗口代码大全---aspx页面弹出窗口代码大全(2)
- [ASP.NET]如何点击按钮弹出新窗口,输入数据后返回并刷新页面?(C#代码)
- 10种asp.net页面弹出提示信息
- c#(asp.net)页面运弹出保存对话框?
- asp.net中页面延时跳转代码
- ASP.NET后台代码方式识别页面“按钮点击”和浏览器F5“刷新”事件
- [转]在Asp.net中弹出对话框,然后跳转到其他页面问题