Help, Can't you go with javascript like: Paul, så fort du kommer till nya sidan fångar du adressen med http_referer, sen får du inte hämta den om sidan gör postback, då blir det fel.Response.Redirect (XXXXXXX) to be able to go back to the previuos page ASP.Net
Platform : Web
Language : ASP.Net
Problem :
I need to be able to have a back button or hyperlink that will move the user to the previuos page in a web site...
----------- -------------
| | | |
| Page 1 | | Page 2 |
| | | |
| (page2) | <----> | (Back) |
------------ ------------
So when user presses page2 link on Page1 response.redirect(Page2)
And I want to be able for the user to press the (back) link on Page2 and I want to user to go back to Page1.
I have tried response.redirect(request.servervariables("HTTP_REFERER") but the Page2 only redirects itself to itself. I mean it does not go back but stays where it is?
I never know exactley from what page the user has moved from to get to Page2 so I can not hard code.
cheers Paul
Much appreiciate all help.Sv: Response.Redirect (XXXXXXX) to be able to go back to the previuos page ASP.N
<a href="javascript:history.back()">Sv: Response.Redirect (XXXXXXX) to be able to go back to the previuos page ASP.
If Not isPostBack=True Then
formerUrl = ....
Else
' we had a postback
End If