ASP.NET: Maintain Scroll Position On Postback

3. April 2006

The MaintainScrollPositionOnPostback page directive attribute allows pages to automatically maintain the current scroll position across postbacks. This feature is usefull for large pages where scrolling is necessary to view input controls down further on the page. This works in ASP.NET 2.0 and later.


<%@ Page MaintainScrollPositionOnPostback="true" %>

A simple but very usefull feature.

asp.net

Comments

4/6/2006 1:14:00 PM #
Thanks for pointing out this feature (I used to use a custom control to handle this).

Is there a list of these features written down somewhere? Or do you just have to poke through lots of documentation and check out all of the different intellisense options in VS2005 to find them?
Sri
Sri
4/7/2006 3:16:00 PM #
Smartnavigation=true implemented the same feature in 1.1 framework
Richard P
Richard P
4/21/2006 2:48:00 PM #
To Sri and anyone else who reads,
SmartNavigation only had "issues" and it only worked in IE.  The new MaintainScrollPositionOnPostback apparently works in most common browsers and doesn't have the "issues" associated with SmartNavigation...

Just my 0.2 cents
arun thakur
arun thakur
8/3/2006 9:27:00 AM #
this good for page textbox and other controls but in case of iframe this funtion this fail
Amresh
Amresh
12/29/2006 10:55:00 AM #
Small but Nice piece of info.Great!!