Monday, January 21, 2008

[ASP.NET] Page.MaintainScrollPositionOnPostBack

I recently discovered this property you can set to "true" in the page header declaration (or set programmatically if you're not ok with static declarations) in order to maintain scrolling state on Postback. It's really useful and I managed somehow not to notice it's been introduced since framework 2.0.

Obviously AJAX.NET is a better option, but if you have an old app and you don't wanna bother or don't have the time to enable AJAX ... here you go.

No comments: