Ajax: How to Maintain Scroll Position Following Postback

aspnet.pngAnother quick note to myself:  I keep forgetting how to make an ASP.Net page maintain scroll position following a post back. The answer is…

…to add a “MaintainScrollPositionOnPostback” attribute to the page.

For example:

<%@ Page Language=”vb” AutoEventWireup=”false” Codebehind=”Detail_SessionInstance_Incidents.aspx.vb”
    Inherits=”YouthStats.Detail_SessionInstance_Incidents” MaintainScrollPositionOnPostback=”true” %>

Advertisements

One Response to Ajax: How to Maintain Scroll Position Following Postback

  1. Eloise says:

    Hi there I am so grateful I found your weblog, I really found you by accident, while
    I was looking on Askjeeve for something else, Nonetheless I am here now and
    would just like to say many thanks for a tremendous
    post and a all round exciting blog (I also love the
    theme/design), I don’t have time to go through it all at the minute but
    I have bookmarked it and also added in your RSS feeds, so when I have time I will be back to read a great deal more, Please do keep up the great job.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: