Get the File Name in ASP

This function returns the file name of the current page.

<%
Function getFileName()
Dim lsPath, arPath
lsPath = Request.ServerVariables("SCRIPT_NAME")
arPath = Split(lsPath, "/")' split path into array and grab last item for file name
getFileName = arPath(UBound(arPath,1))
End Function
Dim sFileName
sFileName = getFileName()' get scripts file name
response.write sFileName
%>

Get the best asp web hosting provider now and save 30%

Advertisements



MembersPro

MembersPro PayPal - ASP Membership software

Plug and play ASP membership script that integrates with PayPal to let you charge recurring membership fees.