带有 autopostback =“true”的复选框在转发器内部,在 UpdatePanel 内部单击时将页面弹出回到顶部
我有一个 UpdatePanel,其中包含一个基本上构建复选框列表的中继器。这些复选框通过“OnCheckedChanged”事件设置为 AutoPostback。
当用户选中复选框时,一切都会按预期发生,除了一件事,即页面弹出(或滚动)回到顶部。
导致此 UpdatePanel 刷新的其他控件不会导致此问题,即使只是不在我的中继器内但仍在 UpdatePAnel 内的普通复选框,也可以正常工作(无需滚动回顶部)...
有什么想法吗?
I have an UpdatePanel that contains a repeater that basically builds a list of checkboxes. Those check boxes are set to AutoPostback with an "OnCheckedChanged" event.
When the user checks a checkbox, everything happens as expected except for one thing, the page pops (or scrolls) back to the top.
Other controls that cause this UpdatePanel to refresh don't cause this issue, even just plain checkboxes that ARE NOT inside of my repeater, but still within the UpdatePAnel, work fine (no scroll back to top)...
Any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在顶部的设计视图(源代码)中打开页面,您会发现页面指令
尝试添加MaintainScrollPositionOnPostback =“true”
希望它有帮助!
open your page in designview (Source) at the top you will find pagedirectives
try adding MaintainScrollPositionOnPostback="true"
hope it helps !!!