in my project say I have three pages as below
Default.aspx -> abc.aspx -> process.aspx(final page).
I have Back and Next button for navigating within site. What I want is, if someone is in process.aspx and clicks on browser back button he should get page expired and then he click browser next button he gets back to the process.aspx page.
So, in abc.aspx page Page_Load event I have this line of code
Response.Cache.SetCacheability(System.Web.HttpCacheability.nocache);
So, the first part works fine and if users click browser back button from process.aspx he gets “Your web page has expired” but the problem is … if he click on browser next button
instead of getting the process.aspx page … it’s expiring the page … I mean process.aspx as well getting expired.
Can you please help me with this. I want the process.aspx page back from abc.aspx on click of browser next button instead of expiring it.
Thanks.
It is expiring as the server is considering the movement from ‘abc.aspx’ to ‘process.aspx’ as a new request.
Personally I would be tempted to either…
Admittedly, you do lose some of the grace of using the Back and Next buttons, but embedded the process may feel more natural.