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 ( http://msdn2.microsoft.com/en-us/library/950xf363.aspx ) it is part of the pages tag in web.config, but I just get an unidentified arguement error when I put it there?

Thanks
LVL 4
bhermerAsked:
Who is Participating?
 
TSmoothCommented:
The web.config file is case sensitive. Make sure you are using it in the <pages> element as "maintainScrollPositionOnPostBack" with a lowercase "m".
0
 
deepaknetCommented:
How about SmartNavigation?
0
 
samtran0331Commented:
>>but I just get an unidentified arguement error when I put it there?
is this for a ASP.net 2.0 application?
0
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.
0
 
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
0
 
bhermerAuthor Commented:
;) cheers TSmooth, points are yours!  

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


   <pages maintainScrollPositionOnPostBack = "True">
     
      <namespaces>
                        <clear/>
                        <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"/>
                  </namespaces>
            </pages>
0
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.