aspx Tutorial

NET Articles,jQuery demo, with jQuery, online tutorial,Jquery, SilverLight, Javascript,,JSON, MVC,.NET Articles,demo, Web Services,
Advertise Here


Get our toolbar!


Posted by Aamir Hasan   on Tuesday, June 28, 2011 Total Views:  

In this example, you will learn how to maintain scroll position in page after Postback is fired.

When Postback is fired, user returns on the top position of current page. User has to scroll down manually on last location of the page where he was working.

Page.MaintainScrollPositionOnPostBack Property is used to set or get the position of page after Postback is fired. Page.MaintainScrollPositionOnPostBack is supported in 2.O, 3.O, 3.5 and 4.O

Here’s an example

You can add below line on Page directive for a single page to maintain the previous scroll position when post back is fired.

<%@ Page MaintainScrollPositionOnPostback="true" %>


You can add below script on code behind for a single page to maintain the previous scroll position after post back is fired

Page.MaintainScrollPositionOnPostBack = true;


You can add below settings on Web.Config for all pages to maintain the previous scroll position when Postback is fired.



              <pages maintainScrollPositionOnPostBack="true" />






  1. Page.MaintainScrollPositionOnPostBack will not work in ASP.NET 1.O and 1.1.
  2. Page.SmartNavigation property will work in ASP.NET 1.O and 1.1
  3. Page.SmartNavigation property is Obsolete in Frame work 2.O and higher
Protected by Copyscape Online Plagiarism Tool

Comments (1) -

Carrol Bowlet
Carrol Bowlet United States
7/13/2015 8:25:28 AM #

This is the perfect web site for anybody who wants to find out about this topic. You know so much its almost tough to argue with you (not that I actually will need to�HaHa). You certainly put a new spin on a subject which has been discussed for many years. Wonderful stuff, just great!|

Add comment

  Country flag

  • Comment
  • Preview

Advertizement 1
Advertizement 2
Advertizement 3
Advertizement 4
Advertizement 5