Scroll in Asp.Net Postback

  • Thread starter Thread starter Miguel Dias Moura
  • Start date Start date
M

Miguel Dias Moura

Hello,

When my page is postback on a button click even my page scrolls up to
the original position.

How to make my page return to the last scroll possition or maybe to a
specifique scroll position after postback?

I am working on Asp.Net 2.0.

Thank You,
Miguel
 
Add a page directive..

<%@ Page MaintainScrollPositionOnPostback="true" ... %>
 
In ASP.NET 2.0 this is easy.
Simply use this line of code:

Page.MaintainScrollPositionOnPostBack = True
 
Back
Top