现在做java了,到时候发些java的文章

现在做java了,到时候发些java的文章

博客园 首页 新随笔 联系 订阅 管理
  55 Posts :: 11 Stories :: 2 Comments :: 0 Trackbacks

公告

This article shows how to allows pages to automatically maintain the current scroll position across postbacks.

The MaintainScrollPositionOnPostback page directive attribute allows to do that.

This feature is useful for large pages where scrolling is necessary to view input controls down further on the page.

There are three ways of applying the property to a web page.

  1. You can set it programmatically

    Page.MaintainScrollPositionOnPostBack = true;
  2. In the page declaration

    <%@ Page MaintainScrollPositionOnPostback="true" %>
  3. Or in the web.configs <system.web> section.

    <pages maintainScrollPositionOnPostBack="true" />
This feature is an absolute must-have on large web pages built for postback scenarios.

A simple but very useful feature.

Smartnavigation = true  implemented the same feature in 1.1 framework 

SmartNavigation only had "issues" and it only worked in IE but the new MaintainScrollPositionOnPostback apparently works in most common browsers. 

posted on 2007-01-25 17:24 panzhilei 阅读(123) 评论(0) 编辑 收藏