Maintain Scroll Bar position of a div within a gridview after a PostBack

前端 未结 4 447
一向
一向 2021-02-04 20:43

I used the following piece of code in the web.config in order to maintain the scrollbar position after a server postback:



        
4条回答
  •  伪装坚强ぢ
    2021-02-04 21:41

    For future reference:

    The normal procedure is to write the following in the web.config file:

      
        
        
      
    

    This will preserve the scroll bar position of all web pages.

    If you have a scroll bar within a gridview (or div) then use the following script:

    
    

    And the div must be as follows:

    http://michaelsync.net/2006/06/30/maintain-scroll-position-of-div-using-javascript-aspnet-20

提交回复
热议问题