DotNetNewsgroup.com  
web access to complete list of Microsoft.NET newsgroups
   home   |   control panel login   |   archive  |  
 
  carried group
academic
adonet
aspnet
aspnet.announcements
aspnet.buildingcontrols
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
assignment_manager
datatools
dotnet.distributed_apps
dotnet.general
dotnet.myservices
dotnet.nternationalization
dotnet.scripting
dotnet.security
dotnet.vjsharp
dotnet.vsa
dotnet.xml
dotnetfaqs
framework
framework.clr
framework.compactframework
framework.component_services
framework.controls
framework.databinding
framework.drawing
framework.enhancements
framework.interop
framework.odbcnet
framework.performance
framework.remoting
framework.sdk
framework.setup
framework.webservices
framework.windowsforms
framework.wmi
frwk.windowsforms.designtime
lang.csharp
lang.jscript
lang.vb
lang.vb.controls
lang.vb.data
lang.vb.upgrade
lang.vc
lang.vc.libraries
  
 
start date: Wed, 8 Aug 2007 12:48:13 -0700,    posted on: microsoft.public.dotnet.framework.aspnet        back       

Thread Index
  1    mavrick_101
          2    Peter Bromberg [C# MVP]
          3    mavrick_101
          4    mavrick_101


Going back to the same location on page after postback or reload.   
Hi,

I have a page and if a user posts back data the page would open at the top. 
This is not a problem if the user was looking at the content on the top of 
the page , but if the page is long and the user was at the bottom of the page 
then it looks ugly.

Is there a way IE can go back to the same location after postback or reload?

Thanks
Date:Wed, 8 Aug 2007 12:48:13 -0700   Author:  

RE: Going back to the same location on page after postback or reload.   
To make a single page remember scroll position on postback, set the 
MaintainScrollPositionOnPostback attribute in the @Page directive to True. 

<%@ Page Language="C#" MaintainScrollPositionOnPostback="true"   %>

You can enable the feature for all pages in the site by setting it in the 
<pages> element in Web.config.

<pages maintainScrollPositionOnPostBack="true" />


-- 
Recursion: see Recursion
site:  http://www.eggheadcafe.com
unBlog:  http://petesbloggerama.blogspot.com
bogMetaFinder:    http://www.blogmetafinder.com



"mavrick_101" wrote:


> Hi,
> 
> I have a page and if a user posts back data the page would open at the top. 
> This is not a problem if the user was looking at the content on the top of 
> the page , but if the page is long and the user was at the bottom of the page 
> then it looks ugly.
> 
> Is there a way IE can go back to the same location after postback or reload?
> 
> Thanks
Date:Wed, 8 Aug 2007 17:16:02 -0700   Author:  

RE: Going back to the same location on page after postback or relo   
Thanks Peter,

I'l try that.


"Peter Bromberg [C# MVP]" wrote:


> To make a single page remember scroll position on postback, set the 
> MaintainScrollPositionOnPostback attribute in the @Page directive to True. 
> 
> <%@ Page Language="C#" MaintainScrollPositionOnPostback="true"   %>
> 
> You can enable the feature for all pages in the site by setting it in the 
> <pages> element in Web.config.
> 
> <pages maintainScrollPositionOnPostBack="true" />
> 
> 
> -- 
> Recursion: see Recursion
> site:  http://www.eggheadcafe.com
> unBlog:  http://petesbloggerama.blogspot.com
> bogMetaFinder:    http://www.blogmetafinder.com
> 
> 
> 
> "mavrick_101" wrote:
> 
> > Hi,
> > 
> > I have a page and if a user posts back data the page would open at the top. 
> > This is not a problem if the user was looking at the content on the top of 
> > the page , but if the page is long and the user was at the bottom of the page 
> > then it looks ugly.
> > 
> > Is there a way IE can go back to the same location after postback or reload?
> > 
> > Thanks
Date:Thu, 9 Aug 2007 06:16:00 -0700   Author:  

RE: Going back to the same location on page after postback or relo   
Sorry Peter,

But is this attribute available on .net 1.1 or is it just 2.0, cause I'm 
using 1.1 and getting an error...

".....attribute is not supported by the 'page' directive"






"Peter Bromberg [C# MVP]" wrote:


> To make a single page remember scroll position on postback, set the 
> MaintainScrollPositionOnPostback attribute in the @Page directive to True. 
> 
> <%@ Page Language="C#" MaintainScrollPositionOnPostback="true"   %>
> 
> You can enable the feature for all pages in the site by setting it in the 
> <pages> element in Web.config.
> 
> <pages maintainScrollPositionOnPostBack="true" />
> 
> 
> -- 
> Recursion: see Recursion
> site:  http://www.eggheadcafe.com
> unBlog:  http://petesbloggerama.blogspot.com
> bogMetaFinder:    http://www.blogmetafinder.com
> 
> 
> 
> "mavrick_101" wrote:
> 
> > Hi,
> > 
> > I have a page and if a user posts back data the page would open at the top. 
> > This is not a problem if the user was looking at the content on the top of 
> > the page , but if the page is long and the user was at the bottom of the page 
> > then it looks ugly.
> > 
> > Is there a way IE can go back to the same location after postback or reload?
> > 
> > Thanks
Date:Thu, 9 Aug 2007 06:28:08 -0700   Author:  

Google
 
Web dotnetnewsgroup.com


COPYRIGHT ?2005, EUROFRONT WORLDWIDE LTD., ALL RIGHT RESERVE  |   Contact us