How Preserve Tab Selection On Use of Back Button

3 posts, 0 answers
  1. Kevin
    Kevin avatar
    61 posts
    Member since:
    Oct 2008

    Posted 05 Mar 2010 Link to this post

    I've got code based on the dynamic load of radpageviews with radtabstrip.  Based on one of 3 tabs clicked, I dynamically pull an ascx control into the pageview.  I am also storing the selected tab index in a session object.

    What I'm trying to do is remember what tab the user is on so that when they return using a back button, I can keep the page where they were.

    However it doesn't appear that page_load or any other code is firing on back button usage - just shows the last cached page.

    I have tried using the following but it doesn't seem to help any:
                Response.CacheControl = "private";  
                Response.Expires = -1;  
                Response.AddHeader("pragma", "no-cache");  
     

    Have it at the top of page_load before my base.page_load.

    What's the correct approach here?

    Thx,
    Kevin
  2. Yana
    Admin
    Yana avatar
    5043 posts

    Posted 11 Mar 2010 Link to this post

    Hello Kevin,

    I've attached a simple page which demonstrates how you can achieve the needed approach. Please download it and examine it. Let us know how it goes.

    Best wishes,
    Yana
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. Kevin
    Kevin avatar
    61 posts
    Member since:
    Oct 2008

    Posted 11 Mar 2010 Link to this post

    Thanks for the sample.  So that approach assumes that the page is cached, and it simply grabs whatever value is in the hidden field and uses it to select the appropriate (last selected) tab, correct?

    I'll plug it in and see if it seems to do the trick.

    Thx

    EDIT: yep that does the trick - thx!
Back to Top