Page automatically scrolls up and down on asynchronous postback - UpdatePanel with ajax always visible controlhttp://forums.asp.net/t/1720203.aspx/1?Page+automatically+scrolls+up+and+down+on+asynchronous+postback+UpdatePanel+with+ajax+always+visible+controlWed, 14 Sep 2011 11:43:50 -040017202034595847http://forums.asp.net/p/1720203/4595847.aspx/1?Page+automatically+scrolls+up+and+down+on+asynchronous+postback+UpdatePanel+with+ajax+always+visible+controlPage automatically scrolls up and down on asynchronous postback - UpdatePanel with ajax always visible control <p>Hi,</p> <p>On my page there are few updatepanels and each of them has its own&nbsp;ajax always visible control, which shows animation. Always visible control displays animation at the right bottom corner of the page.</p> <p>If&nbsp;the bottom updatepanel does any asynchronous postback then page scrolls up automatically and shows relavent visible control and then scrolls down automatically once its finished with asynchronous postback.</p> <p>Anyone knows that why does the page scrolls up automatically?</p> 2011-09-13T20:00:10-04:004596076http://forums.asp.net/p/1720203/4596076.aspx/1?Re+Page+automatically+scrolls+up+and+down+on+asynchronous+postback+UpdatePanel+with+ajax+always+visible+controlRe: Page automatically scrolls up and down on asynchronous postback - UpdatePanel with ajax always visible control <p>Usually People loves to maintain the scroll postiion. But requirment is reverse, Here is the trick, create an script tag after the scriptmanager and put the following lines:</p> <pre class="prettyprint">&lt;script type=&quot;text/javascript&quot;&gt; var prm = Sys.WebForms.PageRequestManager.getInstance(); prm.add_beginRequest(beginRequest); function beginRequest() { prm._scrollPosition = null; } &lt;/script&gt;</pre> <pre class="prettyprint"><span class="tag"></span><span class="pln"> </span></pre> <p><a href="http://aspnet.4guysfromrolla.com/articles/111704-1.aspx">http://aspnet.4guysfromrolla.com/articles/111704-1.aspx</a></p> <p><a href="http://basgun.wordpress.com/2008/06/09/maintain-scroll-position-updatepanel-postback/">http://basgun.wordpress.com/2008/06/09/maintain-scroll-position-updatepanel-postback/</a></p> <p><span face="Tahoma" color="#000080" style="color:#000080; font-family:Tahoma">&lt;pages smartNavigation=&quot;true&quot; <span face="Verdana" style="font-family:Verdana"><span style="color:red">MaintainScrollPositionOnPostback</span><span style="color:blue">=&quot;true&quot;</span></span>/&gt;</span></p> <p><span face="Tahoma" color="#000080" style="color:#000080; font-family:Tahoma">Lety me know if this helpful to you</span></p> 2011-09-14T03:04:43-04:004596881http://forums.asp.net/p/1720203/4596881.aspx/1?Re+Page+automatically+scrolls+up+and+down+on+asynchronous+postback+UpdatePanel+with+ajax+always+visible+controlRe: Page automatically scrolls up and down on asynchronous postback - UpdatePanel with ajax always visible control <p>Hi Chetan,</p> <p>Thanks for your input but i actually want to keep the scroll bar position.</p> <p>I am going to run some tests on my code and will see if i can find the problem, otherwise i will paste my aspx code here.</p> <p>Many Thanks</p> <p>&nbsp;</p> 2011-09-14T11:43:50-04:00