Tip Details Add a Related Tip

Rate as: Positive Negative

Maintaining page scroll position with ASP.Net 2.0

In ASP.Net 2.0, it's really easy to maintain the scrolling position on the page when the page gets posted back to itself. It's a good idea to do this so that when the post is made, the user does not have to scroll back down to where they were. This makes the users happy, which is the goal of all developers, right?

To do this, just add the MaintainScrollPostionOnPostBack attribute to the Page directive like so

<%@ Page Language="C#" MaintainScrollPositionOnPostback="true" ...rest of directive... %>

With this one simple attribute you can save your users some minor trouble, but it's one of those things that makes a sight look good to the user.
Rating: no ratings, 0 total Votes
Categories: ASP .Net programming
Added: on Jun 08, 2007 at 12:31 pm
Added By: an anonymous user

Comments on this Tip

Add a Comment
There are no comments for this tip
Your Comment:
(how to format)
Rate This Tip:

Verify Humanity:
Sorry, we know it's annoying, but please enter the characters shown in the image to the left so that we know you're an actual person and not an evil spammer. Thanks.
       

Related Tips

Using ASP.Net variables in your Javascript code

100% positive, 2 comments - last added on Sep 04, 2007 at 7:12 am
– Tip added by an anonymous user on May 05, 2007 at 7:00 am

Setting the button triggered by the enter key

Categories: programming ASP .Net web
100% positive, 0 comments
– Tip added by an anonymous user on Jun 05, 2007 at 6:09 pm

Electronic payment processing in ASP.Net web applications

Categories: programming ASP .Net web
100% positive, 1 comment - last added on Apr 30, 2007 at 1:32 pm
– Tip added by an anonymous user on Apr 25, 2007 at 12:01 pm

Master pages in ASP.Net 2.0

Categories: programming ASP .Net
100% positive, 0 comments
– Tip added by an anonymous user on Apr 24, 2007 at 3:05 pm

Adding an email attachment in .Net

Categories: programming ASP .Net web
0% positive, 0 comments
– Tip added by an anonymous user on Apr 26, 2007 at 3:49 pm

Hex colors in System.Drawing

Categories: ASP .Net web
100% positive, 1 comment - last added on May 27, 2007 at 8:18 pm
– Tip added by an anonymous user on May 25, 2007 at 8:44 am

Matching any character in a javascript regular expression

100% positive, 1 comment - last added on Oct 01, 2008 at 10:12 am
– Tip added by an anonymous user on Aug 18, 2008 at 9:06 am

Determining keywords for your pages

100% positive, 0 comments
– Tip added by an anonymous user on Nov 13, 2008 at 10:28 am

Length of associative arrays in Javascript

100% positive, 0 comments
– Tip added by an anonymous user on Nov 04, 2008 at 10:13 am

Google web search API

100% positive, 0 comments
– Tip added by an anonymous user on Oct 31, 2008 at 4:32 pm

Debugging Javascript

100% positive, 0 comments
– Tip added by an anonymous user on Sep 12, 2008 at 2:35 pm

Submitting web forms without buttons

100% positive, 1 comment - last added on Aug 06, 2008 at 1:26 pm
– Tip added by an anonymous user on Aug 06, 2008 at 8:16 am

Random number generation

100% positive, 0 comments
– Tip added by an anonymous user on Aug 05, 2008 at 6:49 am

Optional parameters in javascript functions

100% positive, 0 comments
– Tip added by an anonymous user on Jul 30, 2008 at 10:44 am

Detecting if a variable exists in Javascript

100% positive, 1 comment - last added on Sep 03, 2008 at 6:12 am
– Tip added by an anonymous user on Jul 22, 2008 at 8:31 am

Creating charts in PHP

no ratings, 0 comments
– Tip added by an anonymous user 3 days, 9 hours ago

553 sorry, your envelope sender domain must exist errors

no ratings, 0 comments
– Tip added by an anonymous user on Sep 26, 2008 at 3:35 pm

attaching events to nodes in Javascript

no ratings, 0 comments
– Tip added by an anonymous user on Aug 18, 2008 at 11:23 am

Figuring out shortcuts in Eclipse

no ratings, 0 comments
– Tip added by an anonymous user on Aug 13, 2008 at 3:17 pm

animating elements with jQuery

no ratings, 0 comments
– Tip added by an anonymous user on Aug 04, 2008 at 1:46 pm