|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
I was wondering if I could use the same 'Thank You' page but display a different message depending on which page it was referred to from: eg an order page or a mailing list page.
Is there a way ASP can tell which was the preceding page? |
|
#2
|
|||
|
|||
|
Request.ServerVariables("HTTP_REFERER") should give you the info you want, unless you're using a response.redirect to get to the page. If you are, maybe you could use a session variable and the SCRIPT_NAME variable.
|
|
#3
|
||||
|
||||
|
|
|
#4
|
|||
|
|||
|
or, you can use querystring:
response.redirect "Hello.asp?Message=Welcome" response.redirect "Hello.asp?Message=Welcome2" etc etc... Then, in the welcome page: strMessage = request ("Welcome") Select Case strMessage Case is "Welcome" Do stuff Case is "Welcome2" Do other stuff End If its possible, the welcome message being passed can be used in a common sentence: "You have just " strWelcome & " a book" Where strWelcome can be "added", "deleted", "returned", etc... and it will always make sense... |
|
#5
|
|||
|
|||
|
Quote:
Request.ServerVariables("HTTP_REFERER") note: will not go through certain routers/switches if you're wondering why it's blank sometimes. |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ASP Programming > Modifying content depending on referring page |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|