dbWriter page name from Request.ServerVariables("SCRIPT_NAME") ASP code
If you need to hard code the page name into your asp code and
you know that you are going to change it. This code will strip the
name from Request.ServerVariables("SCRIPT_NAME") so you do not
have to recode your page every time it's name changes.
To strip the page name from the URL use this code:
[This code ran on this page = PagefromURL.asp]
<%
DIM strPageName
DIM strURL
DIM strURLparts
strURL = Request.ServerVariables("SCRIPT_NAME")
strURLparts = split(strURL, "/")
strPageName = strURLparts(ubound(strURLparts))
%> |
|