none
Implementing IE back button using C# code

    Question

  • I want to know how the Back functionality is implemented in IE? How does it remember the values of the controls and their positions?
    I am developing a secure website wherein I have disabled the page cache using :
                HttpContext.Current.Response.Cache.SetExpires(DateTime.Now.AddDays(-2));
                HttpContext.Current.Response.Cache.SetValidUntilExpires(false);
                HttpContext.Current.Response.Cache.SetRevalidation(HttpCacheRevalidation.AllCaches);
                HttpContext.Current.Response.Cache.SetCacheability(HttpCacheability.NoCache);
                HttpContext.Current.Response.Cache.SetNoStore();
                HttpContext.Current.Response.Cache.SetNoServerCaching();

    So when a user clicks on the back button, Page expired message comes up asking the user to refresh the page. Now if I want to implement a custom Back link/button on the page which will remember all the controls, their values and position. I have seen this functionality in some secure sites, but I dont know how to implement it. I tried using  Request.UrlReferrer but it remebers only the previous page. Any advice??
    Wednesday, June 24, 2009 9:20 PM

All replies

  • Any suggestion is welcomed..
    Wednesday, July 01, 2009 5:51 PM
  • if your aim is to just get back to the same page i.e a cached page then you can just add this instead of a server code.


    <input type="button" value="Back to Previous Page" onClick="javascript: history.go(-1)">

    This is will work out as i implemented in the same way.

    Thanks,
    Pr@shanth
    • Proposed as answer by Prashanth_bv Friday, September 04, 2009 11:28 AM
    Friday, September 04, 2009 11:27 AM