473,379 Members | 1,326 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 software developers and data experts.

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.

Thanks for any input.
Jul 19 '05 #1
2 1001
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" <sb*****@mileslumber.com> wrote in message
news:eX**************@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.

Jul 19 '05 #2
Steven Burn wrote on 29 jun 2004 in
microsoft.public.inetserver.asp.general:
"Scott" <sb*****@mileslumber.com> wrote in message
news:eX**************@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.

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)
Jul 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Eyal | last post by:
Hey, I would appriciate if anyone can help on this one: I have a java object/inteface having a method with a boolean parameter. As I'm trying to call this method from a javascript it fails on...
5
by: Francis Bell | last post by:
I just found that my fin stream is not getting passed to my readInASpinnerbait function. Here's what I have: string readInFirstChars(ifstream &fin) { char first; string print; while...
3
by: Hitesh | last post by:
Hi, I am getting the response from another Website by using the HttpHandler in my current site. I am getting the page but all the images on that page are not appearing only placeholder are...
0
by: buntyindia | last post by:
Hi, I have a very strange problem with my application. I have developed it using Struts. I have a TextBox With Some fixed value in it and on Submit iam passing it to another page. <html:form...
2
by: hgarg | last post by:
The onpaint() is getting called before calculating the required parameters by listBox1_SelectedIndexChanged function. I tried calling it at the end of this function. But of no use. Due to this issue...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.