Redirect your user to their starting point when validation errors occur

Ever had a long webpage with validation that fails on postback but returns the user to the top of the page instead of where you want them?

Annoying isnt it. Well in .Net Framework 2.0 (yes it’s been there a while now), you can use the property:

Page.MaintainScrollPositionOnPostBack = true;

Well this will force the user to be returned back to the last point they clicked i.e. could be a control, button, checkbox etc

Very useful and helps with improving the user experience, something we should all be striving for!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.