ASP.net Postback - Scroll to Specific Position

后端 未结 9 1033
天命终不由人
天命终不由人 2020-12-15 16:50

I have an ASP.net WebForms page that has a lot of content on the top of the screen. It has a link button that will post back to the page and show another section of the page

9条回答
  •  执念已碎
    2020-12-15 17:20

    Page.MaintainScrollPositionOnPostBack = true; should take you back to the same position on the screen, but you could use AJAX, or you could use SetFocus() to focus on a specific control after the postback:

    http://msdn.microsoft.com/en-us/library/ms178232.aspx

提交回复
热议问题