亲爱的朋友们, 我有两页 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中重定向后刷新网页
发布评论