By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,827 Members | 2,220 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,827 IT Pros & Developers. It's quick & easy.

Skip current page when using back button

P: n/a
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?

Nov 19 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
ti****@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
Nov 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.