CodeCharge Studio

HTMLTemplate Variable (ASP)

Applies to

Page Context

Type

object (clsTemplate)

Access

read-only

Syntax

HTMLTemplate.<member>...

Description

HTMLTemplate is a global variable that stores a reference to a template object which is an instance of clsTemplate class.
clsTemplate
The template object is responsible for loading the template file related to the current page, building the hierarchical structure of the template blocks/variables and finally replacing the template variables with dynamic values. This variable can be used to set the value of custom template blocks or template variables using the SetVar method.

Examples

The example below shows an extract from an HTML template file with a template variable called user_state.
	<input name="user" {user_state}>
The following programming code uses the SetVar method of the HTMLTemplate object to set the value of the user_state template variable. When the page is rendered for the browser, the user_state template variable will be replaced by the value disabled and as a result of this, the input control will appear disabled.
	HTMLTemplate.SetVar "@user_state","disabled"

See also

TemplateFileName Variable


On-line, printable versions and updates