Solved

Maintaining scroll position (using nested masterpages) on clicking ajax tabContainer

Posted on 2011-02-14
6
1,286 Views
Last Modified: 2012-05-11
For some reason, introducing an AJAX TabContainer with multiple Tabs forces the scroll position to return to 'just below' the top every time a tab panel is changed.

I have exhausted my patience on trying to implement the solution described here
http://weblogs.asp.net/andrewfrederick/archive/2008/03/04/maintain-scroll-position-after-asynchronous-postback.aspx

I assume its got something to do with using nested masterpages. All examples only extend to simple masterpages.

Have the following in my web.config
<pages maintainScrollPositionOnPostBack="true"> blah blah..................
</pages>

Seriously thinking of abandoning tabContainers as have had numerous issues so please help.
0
Comment
Question by:JOHNFROG
  • 4
6 Comments
 
LVL 9

Accepted Solution

by:
xav056 earned 250 total points
ID: 34893561
try removing  maintainScrollPositionOnPostBack="true"> , and see if that is working, a conflicat might be happening between this and the code you pointed to in the link above
0
 
LVL 5

Assisted Solution

by:Eduardo Goicovich
Eduardo Goicovich earned 250 total points
ID: 34893615
what browser are you using?
0
 

Author Comment

by:JOHNFROG
ID: 34893693
have tried removing maintainScrollPositionOnPostBack="true">
from web.config but still cannot maintain scroll position on tab change.

It is worth noting that if I simply refresh the page using F5 then the page WILL return to the last scroll position.

Every other AJAX control does not have this problem unless a tabContainer is on the page.

For instance, I placed a simple radio button on the bottom of the page below the TabContainer with auto postback turned on. When I change the value of the radiobutton it also returns scroll to the top.

Now if I take away the entire TabContainer and add a bunch of </br>'s to take it place but change nothing else, then the changing of the same radiobutton will maintain scroll position.

Any further help will be appreciated and tested but I have already started building my own tab container using buttons and panels. This has its benefits already as I can easily add some ajax animations etc. More flexibility but messy as.

0
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 

Author Comment

by:JOHNFROG
ID: 34893696
using google chrome
0
 

Author Comment

by:JOHNFROG
ID: 34893729
Ahhhh. Just tested on Firefox and position was maintained.

Any chrome specific patches?
0
 

Author Closing Comment

by:JOHNFROG
ID: 34922312
retiring this question due to the browser issue becoming relevant.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

This article discusses the difference between strict equality operator and equality operator in JavaScript. The Need: Because JavaScript performs an implicit type conversion when performing comparisons, we have to take this into account when wri…
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now