In ASP.NET 2.0 there is a simple new property in the System.Web.UI.Page object called 'MaintainScrollPositionOnPostback'.
When you set this property to 'true', javascript will be inserted in your rendered page that maintains the scroll position in the browser window for all postbacks. Those of us who have done this manually, know that this is not rocket science to achieve, but its sooo nice to be able to set a single property to just 'make it happen'. You can alse set this property in the web.config file to use it on all pages.
<pages validateRequest="false" enableViewStateMac="true" enableEventValidation="false" maintainScrollPositionOnPostBack="true">
I used this property in several DotNetNuke (4.x.x) projects but ran into a major problem when logging off. I always get the error 'The maintainScrollPositionOnPostback property can not be set without an html form'. The standard home page will not be shown :-(
When logging off, dotnetnuke will redirect to a default logoff page located under Admin\Security\logoff.aspx
This is an empty page with only the Page_Load event used. In this event, the user will be logged off from the cookie authentication system and the user will be redirected to the default home page.
To solve the error you only have to set the property to false in the page directive
<%@ Page MaintainScrollPositionOnPostback="false" language="vb" ...