Getting a .NET page to return to same position on postback

By steve, 8 June, 2011

To make a web page return to the same position after a postback, 2 things are required. First, the following must be added to the web.config file:

Second, add the following into the Page_Load() function for the page:

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

Tags

Comments