dasa
dasa

Reputation: 41

How to Stay on same page even I do refresh

I'm developing one asp.net website. I have page which contains menu items like Home,Aboutsus,Help.. like I have 5 tabs. in single page. If I click on second tab and If I do refresh agian its going to home page. How to stay on the same page even I refreshed the page. Hope u understand my problem. Pleas help me. Thanks in advance.

Upvotes: 1

Views: 1909

Answers (3)

SquidScareMe
SquidScareMe

Reputation: 3218

I noticed you mentioned that you're using RadTabStrip. Here is a blog post that describes how to fix your problem using the RabTabStrip's client-side API.

Upvotes: 1

Amir Ismail
Amir Ismail

Reputation: 3883

you can save the page status inside cookies using javascript and read it again by javascript too.for example you can save the selected tab into a cookie and after the page has been refreshed set the selected tab id from a cookie.

this link explain how to set and retrieve cookies using javascript and this link

Upvotes: 0

Muhammad Hasan Khan
Muhammad Hasan Khan

Reputation: 35126

Use jquery history plugin http://plugins.jquery.com/project/jquery-history-web-2-0-hashchange-history-remote

When a user switches tab, change the hash. When the page is loaded, check the hash and move to that tab. You can also do it without using history plugin though.

Upvotes: 2

Related Questions