|
|
|
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:
|
|
|