Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

URL + Path 2

Status
Not open for further replies.
Hi vlitim,

Try:-


Dim sURL
Dim lPos
Dim sString

'Get Page URL
sURL = Request.ServerVariables("URL")

'Get Position of Last "/"
lPos = InStrRev(sURL , "/")

'Get String Segment out of URL
sString = Mid(sURL , lPos , Len(sURL))


Hope This Helps,

Codefish
 
that will get you up to the ?. to get the querystring portion (step=4&pid=5) you need to use:

sQuery = Request.ServerVariables("QUERY_STRING")

so your complete string would be:

sString = Mid(sURL , lPos , Len(sURL)) & "?" & Request.ServerVariables("QUERY_STRING")
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top