in Personal

Page keep scrolling to the top on PostBack? No problem.

If you’re like me, you don’t like your page to scroll all the way back to the top when you click anything that causes a postback now that you’re already scrolled down a screen or two.  So how do you fix this, well, it’s actually really simple.  Just add SmartNavigation=”true” to your page directive on your .aspx pages like so:

<%@Page SmartNavigation=true%>

If you happen to want this enabled on all of your pages, then add the following inside the system.web node of your web.config file:

<system.web>
     <pages smartNavigation=”true”>
</system.web>