When I use Request.ServerVariables("SCRIPT_NAME"), it will pull /html/scriptname.asp. I know this is a stupid question, but I just need the name of the file itself. Thanks!
<added> I know that I can use a replace on it, but that is very limiting in itself. Is there a way to use InStr or InStrRev to do this? </added>
[edited by: macrost at 10:12 pm (utc) on Mar. 25, 2004]
bakedjake
10:12 pm on Mar 25, 2004 (gmt 0)
Mac, I know that DOCUMENT_NAME does it on Apache, but I don't think IIS has that variable.
txbakers
10:12 pm on Mar 25, 2004 (gmt 0)
you can split the string at the "/" and take the filename part.
in Javascript you can do a "lastIndexof" and then take the rightmost chars from that point.
in VB you can do a "right" command based on the inStr of the second "/"
lots of options.
bakedjake
10:24 pm on Mar 25, 2004 (gmt 0)
heh. Weird.
I can get it fine by doing:
<!-- #echo var=DOCUMENT_NAME -->
But response.servervariables doesn't give it to me.
macrost
10:28 pm on Mar 25, 2004 (gmt 0)
tx, Ahh forgot about me split function. :) I'll give that a go, I'm sure it'll work. ;)