zoukankan      html  css  js  c++  java
  • Tip #75: Did you know…How to maintain scrollposition after post back?

    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. 

    1. 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">

    2. Page Level: for a particular page, open the aspx and set the property

      <%@ Page MaintainScrollPositionOnPostback="true" ...

    3. Code level: to set the property programmatically

      Page.MaintainScrollPositionOnPostBack = true;

    Hope this helps.

    Deepak Verma 

  • 相关阅读:
    JZOJ 3845. 简单题(simple)
    JZOJ 3844. 统计损失(count)
    JZOJ 3843. 寻找羔羊(agnus)
    JZOJ 3833. 平坦的折线
    JZOJ 1956. 矩形
    JZOJ 3832. 在哪里建酿酒厂
    mysql 语法一 :case when详解
    阿里云推荐码
    redis配置文件详解(转)
    压力测试工具 webbench总结
  • 原文地址:https://www.cnblogs.com/inday/p/1499711.html
Copyright © 2011-2022 走看看