We Recommend

ASP.NET 3.5 Unleashed ASP.NET 3.5 Unleashed
ASP.NET 3.5 Unleashed is the most comprehensive book available on the Microsoft ASP.NET 3.5 Framework, covering all aspects of the ASP.NET 3.5 Framework--no matter how advanced.


Posted By

savageideas on 11/08/06


Tagged

file ASP filename


Versions (?)


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.