MaintainScrollPositionOnPostBack Compiler Directive

Posted Friday, April 8, 2005 8:12 AM by C-Dog's .NET Tip of the Day
Now, that Microsoft has bothered to post more content, there will be more regular tips of the day again.  This is kind of a cool new feature that I saw posted.  The new MaintainScrollPositionOnPostBack  can be used to maintain the position in the browser whenever a postback occurs.  This will be most useful when you have a large form or a page that is really long and there are links or whatever that cause a postback.  Now when the postback occurs, it will take the user to exactly where he or she left off.
 
To add this to a page, simply add MaintainScrollPositionOnPostBack=true to your compiler directive.
 
<%@ Page Language="C#" MaintainScrollPositionOnPostBack="true" %>

Read the complete post at http://www.dotnettipoftheday.com/blog.aspx?id=147