|
Home > Archive > IIS ASP > June 2004 > Getting URL from string
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Getting URL from string
|
|
|
| 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.
| |
| Steven Burn 2004-06-28, 7:32 pm |
| 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.
>
>
| |
|
| 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!
| |
|
| 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
>
>
| |
| Steven Burn 2004-06-28, 7:32 pm |
| 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
>
>
|
|
|
|
|