Thursday, September 10, 2009

Maintain the scroll bar position in the same location

In the Page Directive of the Asp.Net Page, add the property ‘MaintainScrollPositionOnPostback’ and set its value as ‘true’.

Example:

<%@ Page CodeFile=”Default.aspx.cs” MaintainScrollPositionOnPostback=”true” Inherits=”_Default” %>

Now, the page will maintain the scroll bar position in the same location as it is before postback

No comments:

Post a Comment