Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > History Stack

Reply
Thread Tools

History Stack

 
 
Thom Little
Guest
Posts: n/a
 
      03-18-2005
I have an ASP 3 application that must pass control using JavaScript ...

window.location.replace( strURL + "?result=" + strResult );

This is done in order to maintain the History stack on the callers machine.
My function is called the using window.location.replace( ) and my function
uses window.location.replace( ) to return. As a result, nothing about my
function appears on the callers History stack.

What is the technique for returning from an ASP.NET C# webform the same way?

--
-- Thom Little -- www.tlanet.net -- Thom Little Associates, Ltd.
--



 
Reply With Quote
 
 
 
 
Thom Little
Guest
Posts: n/a
 
      03-18-2005
It is apparently maintained properly by Response.Redirect( ).

--
-- Thom Little -- www.tlanet.net -- Thom Little Associates, Ltd.
--

"Thom Little" <> wrote in message
news:%...
>I have an ASP 3 application that must pass control using JavaScript ...
>
> window.location.replace( strURL + "?result=" + strResult );
>
> This is done in order to maintain the History stack on the callers
> machine. My function is called the using window.location.replace( ) and my
> function uses window.location.replace( ) to return. As a result, nothing
> about my function appears on the callers History stack.
>
> What is the technique for returning from an ASP.NET C# webform the same
> way?
>
> --
> -- Thom Little -- www.tlanet.net -- Thom Little Associates, Ltd.
> --
>
>
>



 
Reply With Quote
 
 
 
 
Kevin Yu [MSFT]
Guest
Posts: n/a
 
      03-19-2005
Hi Thom,

First of all, I would like to confirm my understanding of your issue. From
your description, I understand that you need to achieve the same goal as
window.location.replace at server side. If there is any misunderstanding,
please feel free to let me know.

As far as I know, we cannot achieve this at server side with C# code.
Because when the server receive the request, it sends the response back,
the client web browser thinks it as a new location. and will add a new
history in the history stack.

HTH.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

 
Reply With Quote
 
Thom Little
Guest
Posts: n/a
 
      03-19-2005
If the client calls the server with window.location.replace() and the server
then calls the client on its return with Response.Redirect( ) then the
server entry is never entered into the callers history and a "back arrow"
will take the user back to the page that called the client page.

This even works correctly when there is a query string to the server and
another query string from the server.

My testing with ASP 3 was throwing me off. In ASP e3 you must use
window.location.replace( ) on both the client and the server. This was
apparently corrected in ASP.NET.

Getting that entry off the history stack today has been a monumental
improvement. That annoying "cant get off this page" problem is now gone.

--
-- Thom Little -- www.tlanet.net -- Thom Little Associates, Ltd.
--

"Kevin Yu [MSFT]" <v-> wrote in message
news:...
> Hi Thom,
>
> First of all, I would like to confirm my understanding of your issue. From
> your description, I understand that you need to achieve the same goal as
> window.location.replace at server side. If there is any misunderstanding,
> please feel free to let me know.
>
> As far as I know, we cannot achieve this at server side with C# code.
> Because when the server receive the request, it sends the response back,
> the client web browser thinks it as a new location. and will add a new
> history in the history stack.
>
> HTH.
>
> Kevin Yu
> =======
> "This posting is provided "AS IS" with no warranties, and confers no
> rights."
>



 
Reply With Quote
 
Kevin Yu [MSFT]
Guest
Posts: n/a
 
      03-22-2005
Hi Thom,

If we use Response.Redirect in the page load event, we will avoid adding a
history entry to the stack. But if we use a Redirect after the page is load
and send to client, a post back will be send to server. Also,
window.location.replace is only use at client side.

Anyway, thanks for sharing your experience with all the people here. If you
have any questions, please feel free to post them in the community.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

 
Reply With Quote
 
Thom Little
Guest
Posts: n/a
 
      03-23-2005
Thanks for the added tip. I am using Response.Redirect in page load.

--
-- Thom Little -- www.tlanet.net -- Thom Little Associates, Ltd.
--

"Kevin Yu [MSFT]" <v-> wrote in message
news:...
> Hi Thom,
>
> If we use Response.Redirect in the page load event, we will avoid adding a
> history entry to the stack. But if we use a Redirect after the page is
> load
> and send to client, a post back will be send to server. Also,
> window.location.replace is only use at client side.
>
> Anyway, thanks for sharing your experience with all the people here. If
> you
> have any questions, please feel free to post them in the community.
>
> Kevin Yu
> =======
> "This posting is provided "AS IS" with no warranties, and confers no
> rights."
>



 
Reply With Quote
 
Kevin Yu [MSFT]
Guest
Posts: n/a
 
      03-23-2005
You're welcome, Thom.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
C/C++ compilers have one stack for local variables and return addresses and then another stack for array allocations on the stack. Casey Hawthorne C Programming 3 11-01-2009 08:23 PM
Values entered in the Form disappears when using the history.go(-1) or history.back() sujith.bolar@gmail.com Javascript 2 10-17-2006 08:12 PM
Recover Firefox web search history with history set to 0 days Sudip Chakraborty Firefox 2 11-21-2005 06:47 PM
[ANN] irb-history 1.0.0: Persistent, shared Readline history for IRB Sam Stephenson Ruby 1 06-18-2005 08:56 AM
history.dat, formhistory.dat - deleting deletes history? S.Rodgers Firefox 4 05-05-2005 01:03 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57