View Single Post
  #1 (permalink)  
Old July 1st, 2005, 05:06 PM
mikehsu317 mikehsu317 is offline
Authorized User
 
Join Date: Oct 2004
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Default how do I strip a URL down to the filename?

How do I strip the URL down to just the file name?

I have
dim dept1, filename
dept1 = Session("Dept")
filename = request.ServerVariables("URL")
filename = filename.substring(filename.lastIndexOf("//"))

I'm thinking .net and it's not working saying that i need an object on the last line.

The third line returns
/something/mypage.asp
I want to get that down to just mypage.asp

thanks
Michael Hsu

Reply With Quote