How to maintain scroll position on autopostback?

前端 未结 12 1702
臣服心动
臣服心动 2020-12-30 21:49

How can I get back to the same position of a page on postback. It always seems to get to the top of the page.

I\'ve tried using maintainSc

12条回答
  •  春和景丽
    2020-12-30 22:19

    Although bbbwex's reply is correct, it actually took me a while to realize I need to place MaintainScrollPositionOnPostback="true" at both

    1. Top of the ASPX page.

    2. In IsPostBack

    It works after I satisfy both condition.

提交回复
热议问题