Saturday, August 29, 2020

How to hold scroll position on autopostback?

 At the top of aspx code file, add the following:

MaintainScrollPositionOnPostback="true"

 

So the first line of index.aspx code file will look like as..

 
<%@ Page Title="index page" MaintainScrollPositionOnPostback="true" Language="C#" AutoEventWireup="true" CodeFile="index.aspx.cs" Inherits="index" %>