Our application uses a telerik ajax tab strip. It has three tabs, known as section1,section2 and section3. Since the tab strip is ajax based the state of it, is not known on the server.
At any point, the user can choose to bookmark the page. When the user loads that bookmarked page, they expect to return to a screen with the tab showing the same tab "selection" as when the bookmark occurred.
Question 1: is there any built capability in telerik to accomplish this?
One way to accomplish this is to use HTML anchors.
Each time the user click on a different tab we can execute custom javascript to change the page's url to contain this anchor. So when the user clicks on the tab named "section2" we change the url from
http://localhost/page.aspx
to this.
http://localhost/page.aspx#tab=section2
Now, when we change the pages url, the browser does not submit the page for a reload. This is because, i believe, the anchor is entirely processed on the client side. The server never even sees anything after the # in the request.. The browser must strip our everything after the # when it passes the URL to the server.
To be specific, as far as the server is concerned these urls all point to the same location
http://localhost/page.aspx
http://localhost/page.aspx#tab=section1
http://localhost/page.aspx#tab=section2
and therefore the browser does not need to resubmit the url when the client side javascript changes the anchor.
So far, that nuanced behavior is working in our favor. The problem is: when the page is reloaded from the bookmark. Now its the client side code responsibility to switch from the first tab which is section1 to section2 which is in the bookmark.
Question 2: Are all of my assumptions correct? Are anchors always ignored by the browser? Does this work reliably across all browser?
Question 3: Is there a better way to accomplish the same thing without using anchors?
Question 4: If it were just a single tab it would be simple, but there are actually more components involved. Are there any tools that can help us update all of the controls based on the contents of the anchor line?