Maintaing scroll position on a postback

by Admin 17. March 2009 12:08

I recently added a widget to this blog and struggled to find a way to maintain the scroll position after clicking submit.  It turns out this is an incredibly easy thing to do (once you find it). All that I needed to do was add the following to the code behind of my master page.

Page.MaintainScrollPositionOnPostback = true;

It requires java script to be enabled; however, it works very well.  In searching for how to do this I found many other solutions, most of which were much more complicated and involved.  Though I am not sure this is the best way, it works for what I needed.

Add comment


(Will show your Gravatar icon)

  Country flag

biuquote
  • Comment
  • Preview
Loading



PasswordGenerator

Characters:    


 

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2010 Rendition17