|
HTMLTemplate Object
The HTML Template Object is a lightweight class whose sole purpose is to completely
separate HTML from server side ASP code. Through the use of special HTML templates,
a web page can be created by setting the parameters of the HTMLTemplate object to match those
found within the chosen HTML template. There are also several system and environmental
variables available to a template file in addition to any user created template variables
although these can be disabled to speed up processing of the templates.
The template file used to power this example can be found here.
The ASP Emporium - Env and Sys Functions
-
The system date function:
@sysDate
returns
9/8/2008
-
The system time function:
@sysTime
returns
5:25:39 AM
-
The system date/time function:
@sysNow
returns
9/8/2008 5:25:39 AM
-
You can also get anything out of the request.serverVariables ASP collection
by prepending the argument name with
@env.
- The
@envPATH_INFO
variable returns:
/aspapps.asp
- The
@envSERVER_NAME
variable returns:
www.aspemporium.com
- The
@envREMOTE_ADDR
variable returns:
38.103.63.60
- The
@envREQUEST_METHOD
variable returns:
GET
- The
@envSERVER_PORT
variable returns:
80
- The
@envSERVER_SOFTWARE
variable returns:
Microsoft-IIS/5.0
- The
@envHTTP_REFERER
variable returns:
- The
@envHTTP_USER_AGENT
variable returns:
CCBot/1.0 (+http://www.commoncrawl.org/bot.html)
- The
@envAUTH_TYPE
variable returns:
|