Just set the MaintainScrollPositionOnPostback directive to True, either on
the page-level or in Web.config if you want it to apply to all pages in the
website. For a single page, update the <% @Page directive so that it looks
lkike:
<%@ Page Language="..." MaintainScrollPositionOnPostback="true" ... %>
To apply the setting to all pages in the website, add the following to the
Web.config file (within the <system.web> element):
<pages maintainScrollPositionOnPostBack="true" />
-- Peter
Recursion: see Recursion
site: http://www.eggheadcafe.com
unBlog: http://petesbloggerama.blogspot.com
BlogMetaFinder: http://www.blogmetafinder.com
> Whenever an ASP.NET server-side control is processed, the client form is
> repainted from the top forcing users to scroll back to where they were on
[quoted text clipped - 26 lines]
> </body>
> </html>
Networxpro - 07 Sep 2007 17:40 GMT
Thanks, but unfortunately this site is running .NET Framework 1.1 and
MaintainScrollPositionOnPostback is new in 2.0
Any other suggestions?
> Just set the MaintainScrollPositionOnPostback directive to True, either on
> the page-level or in Web.config if you want it to apply to all pages in the
[quoted text clipped - 44 lines]
> > </body>
> > </html>
bruce barker - 07 Sep 2007 18:51 GMT
just do the same logic. in clientscript, in onsubmit, store the x & y in
a hidden fields. then on postback render if x & y are filled in, render
client script to set the scroll position.
-- bruce (sqlwork.com)
> Thanks, but unfortunately this site is running .NET Framework 1.1 and
> MaintainScrollPositionOnPostback is new in 2.0
[quoted text clipped - 49 lines]
>>> </body>
>>> </html>
Networxpro - 09 Sep 2007 00:22 GMT
Thanks Bruce & Peter.
Your tips and a search led me to a couple of simple solutions that I can
easily apply to our various webforms:
Steve Stchur's "Maintaining Scroll Position on Postback"
http://aspnet.4guysfromrolla.com/articles/111704-1.aspx
Ibrahim Uludag's "Crossbrowser SmartNavigation Alternatives"
http://www.codeproject.com/aspnet/lili2.asp
Thanks for the help!
Networxpro
> just do the same logic. in clientscript, in onsubmit, store the x & y in
> a hidden fields. then on postback render if x & y are filled in, render
[quoted text clipped - 55 lines]
> >>> </body>
> >>> </html>