|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
how do i display the current URL
hi,
i'd like to know how to display the current URL on the web page as a footer. This seems to be a fairly simple task, but everything i've found on the internet either doesn't work for some reason, or is asp.net specific. Any suggestions would be great. cheers j |
|
#2
|
||||
|
||||
|
Server Variables
You could combine the SERVER_NAME and URL
something like <% Response.write( "http://" & Request.ServerVariables("SERVER_NAME") & Request.ServerVariables("URL") )%> You could check the PORT variable to find out if it is http or https This link lists all the server variables There is another way using server map path or something similar , but I cannot remember the exact code for it. Hope this is helpful. |
|
#3
|
|||
|
|||
|
thanks, but it is not quite right
thanks yassoor.
its on the right track, but only gives : http://csiis.leeds.ac.uk/cbxjrs/page1.asp when i want it to show the full url including extra values, etc : http://csiis.leeds.ac.uk/cbxjrs/pag...g_id=7#Building how do i show the rest? j |
|
#4
|
||||
|
||||
|
One of the Request serve variables is QUERY_STRING
so it would be something like Response.write( "http://" & Request.ServerVariables("SERVER_NAME") & Request.ServerVariables("URL") ) & "?" & Request.ServerVariables("QUERY_STRING") ) %> Read more about those Request.ServerVariables there is alot of info about them .. a simple search on google for "Request.ServerVariables" will return a lot of hits ... Another path is to use javascript (client side) .. I am sure it would be a lot easier that way. I hope this is of any help. |
|
#5
|
|||
|
|||
|
Thanks very much
Thanks yassoor.
thats a great help ![]() j |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ASP Programming > how do i display the current URL |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|