How to maintain page scroll position after a page postback in asp.net

Try the following code on your design page..It works fine for me..

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="frmName.aspx.vb" Inherits="frmName" MaintainScrollPositionOnPostBack = "true" %>

The MaintainScrollPositionOnPostback only works in IE. To do this you can either roll your own client script or use anchor links on different sections of your page/form.

Similar questions here:

MaintainScrollPositionOnPostback is not working - how to debug?

MaintainScrollPositionOnPostback not working with javascript:__doPostBack

maintainScrollPositionOnPostback="true" does not work globally after setting in web.config ,but works in page level,what should I do?


<%@ Page MaintainScrollPositionOnPostback="true" %> as the page declaration will keep the scroll position as it is