Return to Snippet

Revision: 1676
at November 8, 2006 09:07 by savageideas

Initial Code
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

Initial URL

Initial Description

Initial Title
Function to Find File Name of Page Displayed

Initial Tags
file, ASP

Initial Language