Jan 10, 2002 #1 vlitim Programmer Joined Sep 2, 2000 Messages 393 Location GB if the browsers address is http://wwww.testDomain.co.uk/default.asp?step=4&pid=5 how do I get the /default.asp?step=4&pid=5 part
if the browsers address is http://wwww.testDomain.co.uk/default.asp?step=4&pid=5 how do I get the /default.asp?step=4&pid=5 part
Jan 10, 2002 1 #2 CodeFish Programmer Joined Sep 27, 2001 Messages 128 Location GB 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 Upvote 0 Downvote
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
Jan 10, 2002 1 #3 lobstah Programmer Joined May 14, 2001 Messages 384 Location US 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" Upvote 0 Downvote
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"