This is a migrated thread and some comments may be shown as answers.

How Preserve Tab Selection On Use of Back Button

2 Answers 101 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
Kevin
Top achievements
Rank 2
Kevin asked on 05 Mar 2010, 04:07 PM
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 Answers, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 11 Mar 2010, 09:22 AM
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.
0
Kevin
Top achievements
Rank 2
answered on 11 Mar 2010, 06:19 PM
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!
Tags
TabStrip
Asked by
Kevin
Top achievements
Rank 2
Answers by
Yana
Telerik team
Kevin
Top achievements
Rank 2
Share this question
or