在回发用户光标所在的位置后保持网页的位置。 [英] Keep the position of a web page after postback where the user cursor was.

查看:106
本文介绍了在回发用户光标所在的位置后保持网页的位置。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用本文中的代码(我的文章)

创建动态用户友好的基于Web的数据收集表单 [ ^ ]

用于构建Web表单。目前,我正与一位同事一起工作,该表格包含102项具有许多分支/跳过逻辑的项目。用户抱怨的是,当他选择导致表单回发的选项时(尽管重新加载OK并且所有数据都已到位),网页会跳到顶部。有没有办法在重新加载后保持页面的位置,因为用户光标所在的回发。

解决方案

你可以使用页面级指令MaintainScrollPositionOnPostback =true

I am using the code from this article (my article)
Creating Dynamic User Friendly Web-Based Data Collection Forms[^]
in building a web form. Currently i am working with a colleague on a form that contains 102 item with many branching / skip logic. The user complain is that when he choose an option that causes postback of the form (although reload OK with all data in place)the webpage jumps to the top. Is there a way to keep the position of the page after reload due to postback where the user cursor was.

解决方案

you can use page level directive MaintainScrollPositionOnPostback="true"


这篇关于在回发用户光标所在的位置后保持网页的位置。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆