Holding your scroll position after postback without SmartNavigation
-
Hey guys and girls. It's been awhile since I have done any asp.net programming and today while trying to remember how to keep my position on the page after a postback I ran across some articles about SmartNavigation that made me reconsider using it. I'm sure several here know what I'm referring to so my question is how do you get around it so that you can keep your scroll position on the page in at least IE and Firefox? I saw this article today Hold Your (Scroll) Position[^]. Is anyone using this technique? Thanks for the info, Richard
-
Hey guys and girls. It's been awhile since I have done any asp.net programming and today while trying to remember how to keep my position on the page after a postback I ran across some articles about SmartNavigation that made me reconsider using it. I'm sure several here know what I'm referring to so my question is how do you get around it so that you can keep your scroll position on the page in at least IE and Firefox? I saw this article today Hold Your (Scroll) Position[^]. Is anyone using this technique? Thanks for the info, Richard
Hi there. In 2.0 you can use the
MaintainScrollPositionOnPostBack
attribute of the@Page
declaration:<%@ Page Language="C#" MaintainScrollPositionOnPostBack="true" %>