停止-在后退/滚动条历史记录位置上维护滚动位置 [英] Stop - maintainscrollpositiononpostback/ scrollbar history positioning

查看:97
本文介绍了停止-在后退/滚动条历史记录位置上维护滚动位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好.
我正在寻找一个我正在构建的一页网站来解决当前存在的一些问题. *菜单固定在滚动条上
场景-
到达page1.html.向下滚动页面一半(仅用于踢球)现在导航至page2.html,将浏览器滚动器保持在其当前位置(如果站点菜单固定在浏览器顶部,则可能需要导航至page2.html,这种情况才有意义,我的菜单固定在滚动上)确定,现在从page2.html按浏览器的后退按钮...现在page2.html跳到page1.html在page1.html可见之前的最后一个滚动条位置.

无论如何,是否有禁用浏览器滚动条位置历史记录的功能?而是在新内容加载之间滚动到0px.

很抱歉使用不正确的术语.有任何想法吗?

Hello folks.
I''m looking to solve a little niggle I currently have with a one page website I am building. *Menu is fixed on scroll
The scenario -
Arrive on page1.html. Scroll halfway down the page (just for kicks) Now navigate to page2.html leaving browser scroller at its current position(you may need to navigate to page2.html if the site menu is fixed to top of browser for this scenario to make sense, my menu is fixed on scroll)ok, now from page2.html press the browser back button...now page2.html jumps to page1.html last scrollbar position before page1.html is visble.

Is there anyway to disable the browser scollbar position history? Instead inbetween new content loading scrollto 0px.

Sorry for the bad terminology. Any ideas?

推荐答案

您尝试将SmartNavigation设置为false.
http://msdn.microsoft.com/en-us/library/system.web.ui.page.smartnavigation.aspx [ ^ ]
Did you try setting SmartNavigation to false.
http://msdn.microsoft.com/en-us/library/system.web.ui.page.smartnavigation.aspx[^]


这篇关于停止-在后退/滚动条历史记录位置上维护滚动位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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