Set MaintainScrollPositionOnPostBack to True for all pages in app

Ho do I set MaintainScrollPositionOnPostBack  to tru for all pages in my app? according to this article ( ) it is part of the pages tag in web.config, but I just get an unidentified arguement error when I put it there?

Who is Participating?
The web.config file is case sensitive. Make sure you are using it in the <pages> element as "maintainScrollPositionOnPostBack" with a lowercase "m".
How about SmartNavigation?
>>but I just get an unidentified arguement error when I put it there?
is this for a 2.0 application?
Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

bhermerAuthor Commented:
yes ASP 2, works fine in a partial class file.
bhermerAuthor Commented:
AS for SmartNavigation I dont know how tat works, I have always used MaintainScrollPositionOnPostBack  on a page by page basis, I happen to be doing a site at the mo that needs it on every page, just thought it would be nice to set it globally
bhermerAuthor Commented:
;) cheers TSmooth, points are yours!  

FYI readers, my pages tag in web.config is this below

   <pages maintainScrollPositionOnPostBack = "True">
                        <add namespace="System"/>
                        <add namespace="System.Collections"/>
                        <add namespace="System.Collections.Specialized"/>
                        <add namespace="System.Configuration"/>
                        <add namespace="System.Text"/>
                        <add namespace="System.Text.RegularExpressions"/>
                        <add namespace="System.Web"/>
                        <add namespace="System.Web.Caching"/>
                        <add namespace="System.Web.SessionState"/>
                        <add namespace="System.Web.Security"/>
                        <add namespace="System.Web.Profile"/>
                        <add namespace="System.Web.UI"/>
                        <add namespace="System.Web.UI.WebControls"/>
                        <add namespace="System.Web.UI.WebControls.WebParts"/>
                        <add namespace="System.Web.UI.HtmlControls"/>
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.