如何在asp.net中重定向后刷新网页

编程入门 行业动态 更新时间:2024-10-22 07:20:19
本文介绍了如何在asp中重定向后刷新网页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

亲爱的朋友们, 我有两页 1)添加记录 2)新注册 我想在asp中重定向页面时只刷新一次新注册页面。 重定向来自add的网址记录页面。 这是我的代码。 ScriptManager.RegisterStartupScript(this,this.GetType( ),RunCode,javascript:alert('Application Submitted Successfully'); window.close(),document.location.href ='NewRegistration.aspx';,true); 我想在重定向后刷新NewRegistration页面。 请帮助,谢谢

Dear Friends, I have two pages 1) Add Records 2) New Registration I want to Refresh the New Registration page only once when am redirecting the page in asp. am redirecting the url from add records page. This is my Code. ScriptManager.RegisterStartupScript(this, this.GetType(), "RunCode", "javascript:alert(' Application Submitted Successfully');window.close(),document.location.href='NewRegistration.aspx';", true); I want to Refresh NewRegistration Page after Redirecting. Please help, thanks

推荐答案

从您的代码中可以看出,您正在关闭窗口并期望其他窗口打开NewRegistration.aspx页面。 首次加载页面时,您无需刷新页面。在这里你删除window.close并检查你需要什么工作正常。 ScriptManager.RegisterStartupScript(this,this.GetType(),RunCode,javascript:alert('Application Commitmitted Successfully'); document.location.href = 'NewRegistration.aspx';,true); 希望你得到你想要的东西 问候, Prasath SJ Hi, It seems from your code, you are closing the window and expecting other window to open the "NewRegistration.aspx" page. You dont have to refresh your page as the page is loading for the first time. here your remove the window.close and check what you required is working fine. ScriptManager.RegisterStartupScript(this, this.GetType(), "RunCode", "javascript:alert(' Application Submitted Successfully');document.location.href='NewRegistration.aspx';", true); Hope you get what you want Regards, Prasath S J

更多推荐

如何在asp.net中重定向后刷新网页

本文发布于:2023-10-12 16:58:59,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1485320.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:重定向   网页   如何在   net   asp

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!