Maintaining Scroll Position of page after autopostback or failed submission in ASP.NET

This is a small but quite handy trick to send user back where he was in web page after unsuccessful submission or auto post back of the page. However, doing this programmatically will cost you a lot. What ASP.NET developed page does is that it remembers scroll position at time of submission and returns user the at exactly the same scroll position.

Just set MaintainScrollPositionOnPostBack property to “true” at the very beginning of your web page and you will see the ASP.NET’s efficiency.

Thanks
A Rahim Khan

Advertisements
  1. No trackbacks yet.

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: