ASP Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreASP Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
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  
Old March 22nd, 2003, 06:33 PM
raven19j raven19j is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Posts: 9 raven19j User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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

Reply With Quote
  #2  
Old March 22nd, 2003, 07:19 PM
yassoor's Avatar
yassoor yassoor is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Location: Canada - Egypt
Posts: 60 yassoor User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
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.
__________________
I hope this is of any help to anyone.

Yassoor
http://www.WebsitesCreation.ca

Reply With Quote
  #3  
Old March 23rd, 2003, 06:56 PM
raven19j raven19j is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Posts: 9 raven19j User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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

Reply With Quote
  #4  
Old March 23rd, 2003, 08:23 PM
yassoor's Avatar
yassoor yassoor is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Location: Canada - Egypt
Posts: 60 yassoor User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
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.

Reply With Quote
  #5  
Old March 23rd, 2003, 08:32 PM
raven19j raven19j is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Posts: 9 raven19j User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thanks very much

Thanks yassoor.

thats a great help

j

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreASP Programming > how do i display the current URL


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway