|
 |
aspx thread: Position page on load and keep state?
Message #1 by "Saul Kaplan" <skaplan@o...> on Fri, 28 Sep 2001 03:53:53
|
|
Hi
My .NET web page consists of several sections, if I scroll down to a
section, enter some data and hit update, when the page is reloaded it is
positioned at the top of the page and not on the section I was working
on. This is confusing for users. How would one do a page load, and
postion where it was before (say at a specified anchor)- while at the same
time maintining viewstate on the page (IsPostBack must remain true) - so
we can not do a Redirect("www.MyPage.com#MyAnchor") - as this will start a
fresh instance of the page and we loose our state?
I hoping there is some code I can run in the page load which will jump the
page to the required position/location/anchor.
Any help apprecaited.
Thanks
Saul
Message #2 by "Chris Scott" <chris@e...> on Fri, 28 Sep 2001 09:44:24 -0700
|
|
Hi Saul,
For IE5+, the Smart Navigation page directive may be the answer:
<%@ Page SmartNavigation=true %>
This will maintain scroll position & element focus between reloads.
For other browsers, the option will not be applied.
HTH,
Chris
----- Original Message -----
From: "Saul Kaplan" <skaplan@o...>
To: "ASP+" <aspx@p...>
Sent: Friday, September 28, 2001 3:53 AM
Subject: [aspx] Position page on load and keep state?
> Hi
>
> My .NET web page consists of several sections, if I scroll down to a
> section, enter some data and hit update, when the page is reloaded it is
> positioned at the top of the page and not on the section I was working
> on. This is confusing for users. How would one do a page load, and
> postion where it was before (say at a specified anchor)- while at the same
> time maintining viewstate on the page (IsPostBack must remain true) - so
> we can not do a Redirect("www.MyPage.com#MyAnchor") - as this will start a
> fresh instance of the page and we loose our state?
>
> I hoping there is some code I can run in the page load which will jump the
> page to the required position/location/anchor.
>
> Any help apprecaited.
> Thanks
> Saul
>
Message #3 by "Saul Kaplan" <skaplan@o...> on Sun, 30 Sep 2001 01:14:08
|
|
Hi Chris
Thank you. It works Great!
Saul
> Hi Saul,
>
> For IE5+, the Smart Navigation page directive may be the answer:
> <%@ Page SmartNavigation=true %>
>
> This will maintain scroll position & element focus between reloads.
> For other browsers, the option will not be applied.
>
> HTH,
>
> Chris
>
> ----- Original Message -----
> From: "Saul Kaplan" <skaplan@o...>
> To: "ASP+" <aspx@p...>
> Sent: Friday, September 28, 2001 3:53 AM
> Subject: [aspx] Position page on load and keep state?
>
>
> > Hi
> >
> > My .NET web page consists of several sections, if I scroll down to a
> > section, enter some data and hit update, when the page is reloaded it
is
> > positioned at the top of the page and not on the section I was working
> > on. This is confusing for users. How would one do a page load, and
> > postion where it was before (say at a specified anchor)- while at the
same
> > time maintining viewstate on the page (IsPostBack must remain true) -
so
> > we can not do a Redirect("www.MyPage.com#MyAnchor") - as this will
start a
> > fresh instance of the page and we loose our state?
> >
> > I hoping there is some code I can run in the page load which will jump
the
> > page to the required position/location/anchor.
> >
> > Any help apprecaited.
> > Thanks
> > Saul
> >
|
|
 |