Solved  -  Maintainscrollpositiononpostback does not work

Posted on 2011-05-04
Last Modified: 2012-05-11
I am working with VB in VS 2.0 - please supply solution in VB.

Maintainscrollpositiononpostback does not work in Chrome or Safari browsers.

I have tried adding "MaintainScrollPositionOnPostback="true"" to the Page Directive, also
Page.MaintainScrollPositionOnPostBack = True in the code behind.

I read your solution and added the 2 registrations for Ajax (I cannot see them now so I am going from memory, but they were written just below the aspx source page declaration) but my project did not compile, the message said something like "cannot find objects to register".

Can you assist ? I would like the scroll position to be retained on postback for not only IE and Firefox, but also Chrome and Safari

Thank you.
Question by:GregoryNelson
    LVL 13

    Expert Comment


    Accepted Solution

    Thank you.  Can I ask further question s?

    1)  I tried the first link which didnt work - I followed the advice of Max and mKamoski in the link and created a SafariFix.browser.xml file with those 7 lines but of course nothing was referencing it so presumably it just sat in the root directory and did nothing.  
    Should there be references to it?  from where ?  what about RefID's for different browsers and versions?

    2)  I did not try the second solution as I do not know JQUERY.  Should I just copy and paste into the aspx source code (html/javascript) page ?  Do I need any references on the top below Page Directive or anything ??

    Many thanks for your patience

    Greg Nelson

    Author Closing Comment

    Because this Q was open for some time and no-one was answering it so I thought I should close it.

    In the end I had to differentiate between browsers, allowing mainstainscrollposition to apply to those browsers that accepted it and used control.focus (not really too good) form those that did not.

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    This article discusses the ASP.NET AJAX ModalPopupExtender control. In this article we will show how to use the ModalPopupExtender control, how to display/show/call the ASP.NET AJAX ModalPopupExtender control from javascript, how to show/display/cal…
    ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
    This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…

    732 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

    20 Experts available now in Live!

    Get 1:1 Help Now