Solved

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

Posted on 2011-02-14
6
1,305 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
The Ultimate Checklist to Optimize Your Website

Websites are getting bigger and complicated by the day. Video, images, custom fonts are all great for showcasing your product/service. But the price to pay in terms of reduced page load times and ultimately, decreased sales, can lead to some difficult decisions about what to cut.

 

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

Transaction Monitoring Vs. Real User Monitoring

Synthetic Transaction Monitoring Vs. Real User Monitoring: When To Use Each Approach? In this article, we will discuss two major monitoring approaches: Synthetic Transaction and Real User Monitoring.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

jQuery is a JavaScript library that greatly simplifies JavaScript programming. AJAX is an acronym formed from "Asynchronous JavaScript and XML."  AJAX refers to any communication between client and server, when the human client does not observe a…
Introduction A frequently asked question goes something like this:  "I am running a long process in the background and I want to alert my client when the process finishes.  How can I send a message to the browser?"  Unfortunately, the short answer…
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…

688 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