Click to See Complete Forum and Search --> : Major issue !!
RoniR
12-20-2006, 09:30 AM
hey guys in my web application one of the users stumbeled on a link in a datagrid that resulted a page error.Now when an error occurs i usually redirect the user to a page called ErrorPage.aspx with the single sentence "An error has occured! Sorry for the inconvenience ...".Now i want to create a link that has the address of the last clicked one and add it so that the user can click on it and go back to were he was before the error occured.I have no idea were to start or even what to search for.My friend tried helping me out by explaining some php syntax but it wasnt clear.If any1 can help me out with anything i would appreciate it.10x again
lmf232s
12-21-2006, 04:22 PM
I believe this would work but i have never tried it. I do something similar in .net.
On the Error Page
Dim ReturnUrl : ReturnUrl = Request.ServerVariables("HTTP_REFERER")
<a href="<%=ReturnUrl%>"> Return To Page </a>
RoniR
01-04-2007, 03:20 AM
hi
request.ServerVariables("HTTP_REFERER") is what i am looking for.
I wrote that in my page but and a runtime error occured
"Object required=Request"
<html>
<head>
<SCRIPT LANGUAGE="VBScript">
dim ReturnUrl
ReturnUrl=request.ServerVariables("HTTP_REFERER")
</SCRIPT>
</head>
<body>
<p align=center>
<b>"An error has occured! Sorry for the inconvenience ..." </b>
<br><br>
<a href="<%=ReturnUrl%>"> Return To Page </a>
</p>
</body>
</html>
ur help is appreciated