页面部分回发后如何在 UpdatePanel 中保持焦点位置
我在带有更新面板的页面中有四个控件。最初,鼠标焦点设置为第一个控件。当我将页面部分回发到服务器时,焦点会自动从我按下 Tab 键的控件中的最后一个焦点控件移动到第一个控件。有什么办法可以保持最后的焦点吗?
I have four controls in a page with update panel. Initially mouse focus is set to first control. When I partially post back the page to server the focus automatically moves to first control from the last focused control from the control I have tabbed down to. Is there any way to maintain the last focus?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
查看在更新中恢复失去的焦点带有自动回发控件的面板:
Take a look at Restoring Lost Focus in the Update Panel with Auto Post-Back Controls:
我发现这更优雅:
I find this more elegant: