View Single Post
  #2 (permalink)  
Old January 4th, 2007, 09:05 AM
vinod_yadav1919 vinod_yadav1919 is offline
Friend of Wrox
 
Join Date: Oct 2004
Location: delhi, delhi, India.
Posts: 553
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to vinod_yadav1919 Send a message via Yahoo to vinod_yadav1919
Default

Hi RoniR!!
Two ways to do samething
**********test1.asp**********
<html>
<head>
</head>
<body>
<SCRIPT LANGUAGE="VBScript" runat="server">

dim ReturnUrl
ReturnUrl=request.ServerVariables("HTTP_REFERER")

response.write("<p align=center>")
response.write("<b>""An error has occured! Sorry for the inconvenience ..."" </b><br><br>")
response.write("<a href='"&ReturnUrl&"'> Return To Page </a>")
response.write("</p>")
</SCRIPT>
</body>
</html>
***************test2.asp*************
<html>
<head>
<%
  dim ReturnUrl

ReturnUrl=request.ServerVariables("HTTP_REFERER")
%>
</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>
***************
Note:-
In first method you only need to specify runat=server so that ur script will run on the server,since on the client side (when u use <SCRIPT LANGUAGE="VBScript">) ,there is no request object ,that browser can understand.

hope this will help you




Cheers :)

vinod