Posted By

savageideas on 11/08/06


file ASP filename

Versions (?)

Who likes this?

1 person have marked this snippet as a favorite


Function to Find File Name of Page Displayed

 / Published in: ASP

  1. Function getFileName()
  2. Dim lsPath, arPath
  3. 'Obtain the virtual file path
  4. lsPath = Request.ServerVariables("SCRIPT_NAME")
  5. 'Split the path along the /s. This creates a one-dimensional array
  6. arPath = Split(lsPath, "/")
  7. 'The last item in the array contains the file name
  8. getFileName = arPath(UBound(arPath,1))
  9. End Function

Report this snippet  

You need to login to post a comment.