<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:copyright="http://blogs.law.harvard.edu/tech/rss" xmlns:image="http://purl.org/rss/1.0/modules/image/">
    <channel>
        <title>DotNetNuke</title>
        <link>http://geekswithblogs.net/GertVerhoeven/category/6374.aspx</link>
        <description>DotNetNuke</description>
        <language>nl-BE</language>
        <copyright>Gert Verhoeven</copyright>
        <managingEditor>gert.verhoeven78@telenet.be</managingEditor>
        <generator>Subtext Version 0.0.0.0</generator>
        <item>
            <title>DotNetNuke : MaintainScrollPositionOnPostback property can not be set without an html form</title>
            <link>http://geekswithblogs.net/GertVerhoeven/archive/2007/03/18/109130.aspx</link>
            <description>&lt;P&gt;&lt;FONT face=Arial&gt;In ASP.NET 2.0 there is a simple new property in the System.Web.UI.Page object called &lt;FONT color=#000080&gt;'MaintainScrollPositionOnPostback'&lt;/FONT&gt;.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial&gt;When you set this property to 'true', javascript will be inserted in&amp;nbsp;your rendered page that maintains the scroll position in the browser window for all postbacks.&amp;nbsp; Those of us who have done this manually, know that this is not rocket science to achieve, but its sooo nice to be able to set a single property to just 'make it happen'.&amp;nbsp; You can alse set this property in the web.config file to use it&amp;nbsp;on all pages.&amp;nbsp; &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial&gt;&lt;FONT color=#0000ff&gt;&amp;lt;&lt;/FONT&gt;&lt;FONT color=#800000&gt;pages&lt;/FONT&gt;&lt;FONT color=#0000ff&gt; &lt;/FONT&gt;&lt;FONT color=#ff0000&gt;validateRequest&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;=&lt;/FONT&gt;"&lt;FONT color=#0000ff&gt;false&lt;/FONT&gt;"&lt;FONT color=#0000ff&gt; &lt;/FONT&gt;&lt;FONT color=#ff0000&gt;enableViewStateMac&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;=&lt;/FONT&gt;"&lt;FONT color=#0000ff&gt;true&lt;/FONT&gt;"&lt;FONT color=#0000ff&gt; &lt;/FONT&gt;&lt;FONT color=#ff0000&gt;enableEventValidation&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;=&lt;/FONT&gt;"&lt;FONT color=#0000ff&gt;false&lt;/FONT&gt;"&lt;FONT color=#0000ff&gt; &lt;/FONT&gt;&lt;FONT color=#ff0000&gt;maintainScrollPositionOnPostBack&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;=&lt;/FONT&gt;"&lt;FONT color=#0000ff&gt;true&lt;/FONT&gt;"&lt;FONT color=#0000ff&gt;&amp;gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#0000ff&gt;&lt;FONT face=Arial color=#000000&gt;I used this property in several&amp;nbsp;DotNetNuke&amp;nbsp;(4.x.x) projects&amp;nbsp;but ran into a major problem when logging off.&amp;nbsp; I always get the error &lt;FONT color=#000080&gt;'The maintainScrollPositionOnPostback property can not be set without an html form'&lt;/FONT&gt;.&amp;nbsp; The standard home page will not be shown :-(&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#0000ff&gt;&lt;FONT face=Arial color=#000000&gt;When logging off, dotnetnuke will redirect to a default logoff page located under &lt;FONT color=#000080&gt;Admin\Security\logoff.aspx&lt;/FONT&gt;&lt;BR&gt;This is an empty page with&amp;nbsp;only the Page_Load event used.&amp;nbsp; In this event, the user will be logged off from the cookie authentication system and the user will be redirected to the default home page.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#0000ff&gt;&lt;FONT face=Arial color=#000000&gt;To solve the error you only have to set the property to false in the page directive&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT face=Arial&gt;&amp;lt;%&lt;FONT color=#0000ff&gt;@&lt;/FONT&gt; &lt;FONT color=#800000&gt;Page&lt;/FONT&gt; &lt;FONT color=#ff0000&gt;MaintainScrollPositionOnPostback&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;="false"&lt;/FONT&gt; &lt;FONT color=#ff0000&gt;language&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;="vb" ...&lt;/P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=109130"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=109130" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/GertVerhoeven/aggbug/109130.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Gert Verhoeven</dc:creator>
            <guid>http://geekswithblogs.net/GertVerhoeven/archive/2007/03/18/109130.aspx</guid>
            <pubDate>Mon, 19 Mar 2007 04:07:00 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/GertVerhoeven/comments/109130.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/GertVerhoeven/archive/2007/03/18/109130.aspx#feedback</comments>
            <slash:comments>2</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/GertVerhoeven/comments/commentRss/109130.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/GertVerhoeven/services/trackbacks/109130.aspx</trackback:ping>
        </item>
    </channel>
</rss>