H
Hypo
Im relatilvly new to a web programming in general, and
here's the situation i have:
I have a default page with dynamic content, and one
button with onclick code something like this:
{
// do some processing...
Serever.Transfer("second_page.aspx");
// or Response.Redirect("second_page.aspx"); same in
// this case
}
On second page i have a new button called "return to
default page" and in his onclick eventhandler
if i say:
- Serever.Transfer("second_page.aspx"); : It return
se me to default page alright, but in the default page
initial state, not the state in which it was just before
user navigate to the second page.
- Response.Redirect("second_page.aspx"); : Same thing
like Server.Transfer(), it transfers me to the default
page initial state.
- Response.Write("<script>history.go(" +
DepthIndex ");</script>"); : It transfers me to a desired
page alright, but instantly returns where it was (on
second page). Is this wired or what?
I suspect problem is in caching, since it is not good
practice to transfer or redirect to default page and
recreate its prevous state, but i cant figure out this
asp.net caching. I have line in my default.aspx page:
<%@ OutputCache Duration="3600" VaryByParam="none" %>
It results is that default page is unable to do any
roundtrips anymore and totaly blocked. If i say:
<%@ OutputCache Duration="3600" VaryByParam="*" %>
It acts like there's no caching, like in firts case.
Im aware that i must save my whole page to a cache just
before i redirect to another page and then, when user
wants to go back to default page, retrive it from cache
and display it ot the user. But, how do i do that?
Cache.Insert("DefaultPage", Self);
and then later:
Self = Cache["DefaultPage"];
Or is this another of my sily ideas?
I hope someone understud what i want, and by the way,
viewstate is turned off globaly if it is relevant.
Any help would be much appreciated.
Cheers,
Hypo - Vedran
here's the situation i have:
I have a default page with dynamic content, and one
button with onclick code something like this:
{
// do some processing...
Serever.Transfer("second_page.aspx");
// or Response.Redirect("second_page.aspx"); same in
// this case
}
On second page i have a new button called "return to
default page" and in his onclick eventhandler
if i say:
- Serever.Transfer("second_page.aspx"); : It return
se me to default page alright, but in the default page
initial state, not the state in which it was just before
user navigate to the second page.
- Response.Redirect("second_page.aspx"); : Same thing
like Server.Transfer(), it transfers me to the default
page initial state.
- Response.Write("<script>history.go(" +
DepthIndex ");</script>"); : It transfers me to a desired
page alright, but instantly returns where it was (on
second page). Is this wired or what?
I suspect problem is in caching, since it is not good
practice to transfer or redirect to default page and
recreate its prevous state, but i cant figure out this
asp.net caching. I have line in my default.aspx page:
<%@ OutputCache Duration="3600" VaryByParam="none" %>
It results is that default page is unable to do any
roundtrips anymore and totaly blocked. If i say:
<%@ OutputCache Duration="3600" VaryByParam="*" %>
It acts like there's no caching, like in firts case.
Im aware that i must save my whole page to a cache just
before i redirect to another page and then, when user
wants to go back to default page, retrive it from cache
and display it ot the user. But, how do i do that?
Cache.Insert("DefaultPage", Self);
and then later:
Self = Cache["DefaultPage"];
Or is this another of my sily ideas?
I hope someone understud what i want, and by the way,
viewstate is turned off globaly if it is relevant.
Any help would be much appreciated.
Cheers,
Hypo - Vedran