简体   繁体   English

将用户重定向到ASP.net中IE中后退按钮上的自定义页面

[英]Redirect User to custom page on back button in IE in ASP.net

Heloo, Heloo,

i have 3 pages PageA, Page B, Page C, from PageA user redirect to PageB using Response.Redirect, On Body load of Page B user redirect to Page C, and on Page C user redirect to another external link. 我有3页PageA,Page B,Page C,使用Response.Redirect从PageA用户重定向到PageB,在Page B用户的正文负载下重定向到Page C,在Page C用户上重定向到另一个外部链接。 i want to achieve that when user press back button from external link it skip page C and B and directly go to Page A, I have tried so many thing like history.push and history.replace but no successes. 我想实现以下效果:当用户从外部链接按返回按钮时,它跳过了C页和B页,直接转到A页,我已经尝试了很多类似history.push和history.replace之类的方法,但是没有成功。

I think you should use Server.Transfer in Page A and B as it doesn't modify URL and history is not created in browser. 我认为您应该在A和B页中使用Server.Transfer ,因为它不会修改URL,并且不会在浏览器中创建历史记录。 But on Page C use Response.Redirect because now history should be logged. 但是在C页上使用Response.Redirect因为现在应该记录历史记录。 Now when it browser back button is pressed on external page it will get the user to Page A since browser won't find any history for Page B and C. 现在,当在外部页面上按浏览器后退按钮时,它将使用户进入页面A,因为浏览器找不到页面B和C的任何历史记录。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM