如何在ASP.NET中PostBack后保持页面的位置(滚动条位置)
来源:互联网 发布:sql截取字符串前几位 编辑:程序博客网 时间:2024/05/18 02:09
When web pages are posted back to the server, by default user is returned to the top of the page. On a large web page, you might have a requirement to scroll down the user automatically to the last position on the page.
MaintainScrollPositionOnPostBack page property can be used to achieve this in one of the following ways.
- Application level: To set the property by default for all pages in the website, open web.config and add the attribute to the pages node.
<pages maintainScrollPositionOnPostBack="true"> - Page Level: for a particular page, open the aspx and set the property
<%@ Page MaintainScrollPositionOnPostback="true" ... - Code level: to set the property programmatically
Page.MaintainScrollPositionOnPostBack = true;
本文转至: http://blogs.msdn.com/webdevelopertips/archive/2009/06/08/tip-75-did-you-know-how-to-maintain-scrollposition-after-post-back.aspx
Hope this helps.
- 如何在ASP.NET中PostBack后保持页面的位置(滚动条位置)
- 如何在ASP.NET中PostBack后保持页面的位置(滚动条位置)
- ASP.NET 2.0 PostBack请求后保持页面滚动条的位置
- 如何作到在页面POSTBACK刷新后,使LISTBOX的滚动条仍然保持上次的位置
- ASP.net中PostBack后如何保持垂直位置
- ASP.net中PostBack后如何保持垂直位置
- ASP.NET中页面回传后保持滚动条的位置
- Asp.net 在刷新或提交页面后保持滚动条的位置
- Asp.net 在刷新或提交页面后保持滚动条的位置
- 保持页面中滚动条的位置,使得页面提交后滚动条还是在原来的位置
- asp.net页面保持滚动条的位置
- 页面滚动条 刷新后 保持在原来的位置
- 在asp.net页面刷新之后,保持滚动条位置的方法!
- ASP.NET postback(回发)后如何保持网页的位置
- ASP.NET postback(回发)后如何保持网页的位置
- asp.net页面刷新后的滚动条位置不变
- asp.net页面刷新后的滚动条位置不变
- asp.net页面刷新后的滚动条位置不变
- Automation服务器不能创建对象
- c# 基础之水晶报表设计(手动连接到数据库)
- jQuery插件---轻量级的弹出窗口wBox
- 《数据结构》递归算法
- o3d中正反两个面都可以看见贴图
- 如何在ASP.NET中PostBack后保持页面的位置(滚动条位置)
- o3d纹理映射(转)
- o3d模型变换 (转)
- o3d_shapes (转)
- Window 操作系统 DOS 常用命令说明
- class中virtual函数和virtual函数=0的意义
- o3d基本程序框架-(转 这个比我写的全面)
- 这几天总结的一些C++编程经验--关于静态库
- using namespace std的使用(转载)