Creating a Custom Feedback Page Using ASP

To obtain useful information from someone visiting your web pages and to make it easier for the user to submit the information, you can create an Active Server Page (ASP) as follows:

Create a standard form.

1. In the HTML version of the form, create a variable to hold the previous page visited by adding the following after the <FORM> tag:

<input TYPE="hidden" NAME="PrevPage" VALUE='<%= Request.ServerVariables("HTTP_REFERER") %>'

Then, be sure to send the "PrevPage" variable to the form handler. 

2. If you want to include the address of the previously-visited page in the Feedback page that's displayed to the user, include the following in the location on the Feedback page where you want the previously-visited page address to appear:

<strong><font color="red" size="+1"> <%= Request.ServerVariables("HTTP_REFERER") %></font></strong>

3. Save the file with the ".asp" extension.

That's all there is to it! Now, your Feedback.asp page will display the last page visited prior to reaching the Feedback.asp page, and will send that page's address to you when the form is submitted.