/ Published in: ASP
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
Function getFileName() Dim lsPath, arPath 'Obtain the virtual file path lsPath = Request.ServerVariables("SCRIPT_NAME") 'Split the path along the /s. This creates a one-dimensional array arPath = Split(lsPath, "/") 'The last item in the array contains the file name getFileName = arPath(UBound(arPath,1)) End Function