Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net (http://www.velocityreviews.com/forums/f29-asp-net.html)
-   -   Skip current page when using back button (http://www.velocityreviews.com/forums/t94880-skip-current-page-when-using-back-button.html)

ticars@yahoo.com 01-19-2005 11:31 PM

Skip current page when using back button
 
I have a web page which all it does is redirect a user to a different
page (the page to redirect to is based on a database lookup). I want
to make it so that when a user tries to use the back button, they don't
rehit the redirect page. Is this possible? I know Response.Redirect
won't do it, I tried Server.Transfer but received errors. Any ideas?


Rutger Smit 01-19-2005 11:40 PM

Re: Skip current page when using back button
 
ticars@yahoo.com wrote:

> I have a web page which all it does is redirect a user to a different
> page (the page to redirect to is based on a database lookup). I want
> to make it so that when a user tries to use the back button, they don't
> rehit the redirect page. Is this possible? I know Response.Redirect
> won't do it, I tried Server.Transfer but received errors. Any ideas?
>



Give the good old JavaScript a try:

<input type="button" onclick="history.go(-2);" value="Go back">

And if you want tot tackle the browser's back button: set a session
variable in the redirect page so you know that the next time (the even
times) the user comes there you redirect to another url.

//Rutger


All times are GMT. The time now is 04:27 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.