locked
Maintain scroll position on postback does not work when files are deployed to remote server RRS feed

  • Question

  • User-1920993629 posted

    The maintain scroll position on postback feature works as expected with my site running under localhost on the development machine in asp.net. When the files are posted to an IIS 7.0 web server running on a Win2k8 box, maintain scroll position on postback simply does not work.

    The web.config file has:

    <pages theme="ClassicTheme" maintainScrollPositionOnPostBack="true">

    What could be the cause of this problem?

     

    Ali

    Tuesday, February 12, 2013 2:13 AM

All replies

  • User-1822989843 posted

    There are multiple Ways to tackle your problem...

    1> Declare maintainScrollPositionOnPostBack in your web.config inside Pages element...

    <pages maintainScrollPositionOnPostBack="True">

    2>Call the same in the page_load event:

    Page.MaintainScrollPositionOnPostBack = true;

    3> Click "Configuration Editor" in IIS Manager, then you can specify "MaintainScrollPositionOnPostBack" in "system.web/pages" section.

    4> Use Javascript:

    http://weblogs.asp.net/andrewfrederick/archive/2008/03/04/maintain-scroll-position-after-asynchronous-postback.aspx

    http://www.4guysfromrolla.com/articles/111704-1.aspx

    Tuesday, February 12, 2013 2:35 AM
  • User-1920993629 posted

    Thanks for the reply but i had actually did this

    <pages maintainScrollPositionOnPostBack="True">

    It works properly with me locally but when i deployed it on server the scroll position didn't work,i had also place Page.MaintainScrollPositionOnPostBack = true; in page load,but still not working

    Tuesday, February 12, 2013 4:35 AM