Getting url from string
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > IIS server support > IIS ASP > Getting url from string




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Getting url from string  
Scott


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
06-29-04 12:32 AM

If Request.ServerVariables("URL") renders

/myserver/mywebpage.asp

How can I just return mywebpage.asp?

I can use the RIGHT function, but I'd like for it to work on any page,
regardless of the length of the page name.

Thanks for any input.







[ Post a follow-up to this message ]



    Re: Getting url from string  
Steven Burn


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
06-29-04 12:32 AM

Function StripIt(sWhat)
Dim sRes
sRes = Split(sWhat, "/")
StripIt = sRes(UBound(sRes))
End Function

--

Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!


"Scott" <sbailey@mileslumber.com> wrote in message
news:eXWtVlWXEHA.3892@TK2MSFTNGP09.phx.gbl...
> If Request.ServerVariables("URL") renders
>
> /myserver/mywebpage.asp
>
> How can I just return mywebpage.asp?
>
> I can use the RIGHT function, but I'd like for it to work on any page,
> regardless of the length of the page name.
>
> Thanks for any input.
>
>







[ Post a follow-up to this message ]



    Re: Getting url from string  
Evertjan.


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
06-29-04 08:16 AM

Steven Burn wrote on 29 jun 2004 in
microsoft.public.inetserver.asp.general:
> "Scott" <sbailey@mileslumber.com> wrote in message
> news:eXWtVlWXEHA.3892@TK2MSFTNGP09.phx.gbl... 
> Function StripIt(sWhat)
>     Dim sRes
>     sRes = Split(sWhat, "/")
>     StripIt = sRes(UBound(sRes))
> End Function

Or if you are a Richt()winger:

Function StripIt(sWhat)
StripIt = Right(sWhat,len(sWhat)-InstrRev(sWhat,"/"))
End Function



--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)





[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 09:11 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register