Getting a ASP file name via VBScript

  • Thread starter David C. Holley
  • Start date
D

David C. Holley

Is there a function in VBScript that will return the name of the file
that is currently being executed? Basically, I'm looking for a function
that I can use in code similar to this...


<% response.write "The name of this file is - " thisFile.fileName %>

which will result in

The name of this file is - home.asp

being displayed on the page with home.asp executes.
 
C

Chris Hohmann

David C. Holley said:
Is there a function in VBScript that will return the name of the file
that is currently being executed? Basically, I'm looking for a function
that I can use in code similar to this...


<% response.write "The name of this file is - " thisFile.fileName %>

which will result in

The name of this file is - home.asp

being displayed on the page with home.asp executes.

Request.ServerVariables("SCRIPT_NAME")
http://msdn.microsoft.com/library/en-us/iissdk/iis/servervariables.asp
 
D

David Holley

Thank you and know for the code that I was thinking of...

session("go_pageRequested") =
Request.ServerVariables("SCRIPT_NAME")

session("go_pageAlternate") = "reservationRequest_Error.asp"

My soon-to-be custom error page will automatically log the page the
encountered the error and then attempt to redirect to the indicated
page.

David H
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top