Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在网页上有一个gridview。我想在排序gridview后每次回发时保持滚动位置。我在 page 指令中包含了 MaintainScrollPositionOnPostback 属性,下面也包含在 Page_load
Page.MaintainScrollPositionOnPostback = true
但它不起作用。回发后它总是会转到页面顶部。我错过了什么吗?
一种解决方案是在此处提到的更新面板中使用您的 gridview -
在 ASP.NET 中的 Postback 上保持水平和垂直 ScrollPosition