Maintain scroll position means After post back event fired the page position same as before.
There are many ways we can maintain scroll position after postback in asp.net.
First Way: –
we 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” %>
we can also write below code in code behind .aspx.cs file in ASP.Net
Page.MaintainScrollPositionOnPostBack = true;
Third Way : –
We can add below code in web.config file for set all page scroll position maintain.
<pages maintainScrollPositionOnPostBack=”true” />