Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / March 2008

Tip: Looking for answers? Try searching our database.

tabbed interface using ajax : bookmarks and back-button

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
John A Grandy - 26 Mar 2008 01:21 GMT
For a tabbed interface implemented with ajax ( tab contents located inside
an UpdatePanel ) , a well-known problem is the inability to bookmark a
specific tab and the inability to use the back button to return to tabs
previously viewed.

Does anyone have any ideas / solutions / alternate designs for this problem
?
Michael Nemtsev [MVP] - 26 Mar 2008 07:53 GMT
Hello John,

Just change the url when u change the tabs, adding some id, like "mysite.com/tab?<number>"
and when bookmark this page u need to parse the tab number and open it

I'd use the ASP.NET MVC for this

---
WBR,
Michael  Nemtsev [.NET/C# MVP] :: blog: http://spaces.live.com/laflour 

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo

JG> For a tabbed interface implemented with ajax ( tab contents located
JG> inside an UpdatePanel ) , a well-known problem is the inability to
JG> bookmark a specific tab and the inability to use the back button to
JG> return to tabs previously viewed.
JG>
JG> Does anyone have any ideas / solutions / alternate designs for this
JG> problem ?
JG>
bruce barker - 26 Mar 2008 16:42 GMT
most ajax toolkits have a browser history control you use for this. MS is
working on one (see futures). but writing you own is not hard.

the standard way ajax pages write to history is to use the #bookmark feature
of the browser. render bookmarks for each tab. after a tab is selected, in
javascript, navigate to the bookmark for that tab. this will not postback,
because the bookmark is on the page, but will the bookmark to the browser
history.

if the user saves the link, it will have the bookmark (say myurl.aspx#tab1).
when you render the page, your code looks ate the bookmark to determine the
state (which tab fixed).

now all have to code for back button support. no real load is done (or you
coudl just use the onload event). the simple way is to run a timer that
checks if window.location.href has changed.

if you google ajax history support you will find several toolkits for this,
if you want to skip the fun of wrting one.

-- bruce (sqlwork.com)

> For a tabbed interface implemented with ajax ( tab contents located inside
> an UpdatePanel ) , a well-known problem is the inability to bookmark a
[quoted text clipped - 3 lines]
> Does anyone have any ideas / solutions / alternate designs for this problem
> ?

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.