页面滚动维护asp.net中的问题 [英] Page scroll maintaining issue in asp.net

查看:67
本文介绍了页面滚动维护asp.net中的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hello buddy



我一直试图找回一种在回发后维持页面滚动位置的好方法。我尝试了几个选项:



Page.MaintainScrollPositionOnPostBack = True



和web.config方法:



< pages smartNavigation =" true" maintainScrollPositionOnPostBack = QUOT;真" >< / pages>



也使用js。脚本名称Scroll-sever

和Control.focus();



但不起作用。



i有一个页面,有9个文件上传控件,每个都有自己的上传按钮。

每个上传按钮后点击事件触发,屏幕跳转到页面顶部。然后我必须向下滚动才能看到查询的结果。

i找到了一些java脚本选项但不是workig,但我正在寻找一个asp.net解决方案。



任何意见明显...

Hello buddy

i have been trying to find a good way to maintain the scroll position on a page after an postback. i tried a couple options:

Page.MaintainScrollPositionOnPostBack = True

and the web.config method:

<pages smartNavigation="true" maintainScrollPositionOnPostBack="true" ></pages>

also use a js. script fil name Scroll-sever
and Control.focus();

but neither works.

i have a page and there is 9 file upload control with there own upload button for each.
after every upload button click the event fired and screen jumps to the top of the page. then i have to scroll back down to see the results of the query.
i found a few java script options but not workig, but i am looking for an asp.net solution.

any opinion appreciable ...

推荐答案

您是否考虑过将每个文件上传控制放在它自己的iFrame中?那样你只回发iframe的内容,而不是整个页面......
Have you considered putting each file upload control in it's own iFrame? That way you're only posting back the contents of the iframe, not the whole page...


http://msdn.microsoft.com/en- us / library / bb398867.aspx [ ^ ] [ ^ ] < br $>




请访问上面这将对您有所帮助。



希望这个适合你!!!
http://msdn.microsoft.com/en-us/library/bb398867.aspx[^][^]


Please visit above this will help you surely.

Hope this works for you!!!

添加到web.config

< pages maintaincrollpositiononpostback =True>
add into web.config
< pages maintainscrollpositiononpostback="True" >


这篇关于页面滚动维护asp.net中的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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