Maintain the current scroll position across postbacks

Madhu.B.Rokkam
Posted by Madhu.B.Rokkam under ASP.NET category on | Points: 40 | Views : 2201
There are different methods by which we can allows pages to automatically maintain the current scroll position across postbacks

protected void Page_Load(object sender, EventArgs e)
{
Page.MaintainScrollPositionOnPostBack = true;
}


or

<%@ Page Title="Home Page" MaintainScrollPositionOnPostback="true" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
CodeFile="Default.aspx.cs" Inherits="_Default" %>


or

<system.web>
<pages maintainScrollPositionOnPostBack="true" />
</system.web>

Comments or Responses

Login to post response