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. I'm looking for a good example of
using a combination of MID, LEFT, RIGHT, etc to get certain parts of
strings.

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

I've just posted a reply to this question................

--

Regards

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

Keeping it FREE!


"Scott" <sbailey@mileslumber.com> wrote in message
news:OIZSisWXEHA.3716@TK2MSFTNGP11.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. I'm looking for a good example
of
> using a combination of MID, LEFT, RIGHT, etc to get certain parts of
> strings.
>
> Thanks for any input.
>
>







[ Post a follow-up to this message ]



    Re: Getting URL from string  
dlbjr


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


 
06-29-04 12:32 AM

Response.Write GetPageString("/myserver/mywebpage.asp")

Function GetPageString(str1)
If Len(str1) > 0 Then
str1 = StrReverse(str1)
intStop = InStr(1,str1,"/") - 1
If intStop > 0 Then
GetPageString = StrReverse(Left(str1,intStop))
End If
End If
End Function

'dlbjr
'Pleading sagacious indoctrination!







[ Post a follow-up to this message ]



    Re: Getting URL from string  
Scott


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


 
06-29-04 12:32 AM

sorry about double post, i couldn't see my first post until i refreshed and
had already re-submitted. thank you.

"Steven Burn" <pvt@noyb.com> wrote in message
news:%23lZZ8vWXEHA.2408@tk2msftngp13.phx.gbl...
> I've just posted a reply to this question................
>
> --
>
> Regards
>
> Steven Burn
> Ur I.T. Mate Group
> www.it-mate.co.uk
>
> Keeping it FREE!
>
>
> "Scott" <sbailey@mileslumber.com> wrote in message
> news:OIZSisWXEHA.3716@TK2MSFTNGP11.phx.gbl... 
example[vbcol=seagreen]
> of 
>
>







[ 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

No problem :o)

--

Regards

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

Keeping it FREE!


"Scott" <sbailey@mileslumber.com> wrote in message
news:OCvvF7WXEHA.3044@TK2MSFTNGP09.phx.gbl...
> sorry about double post, i couldn't see my first post until i refreshed
and
> had already re-submitted. thank you.
>
> "Steven Burn" <pvt@noyb.com> wrote in message
> news:%23lZZ8vWXEHA.2408@tk2msftngp13.phx.gbl... 
> example 
>
>







[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 09:10 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