CodeCharge Studio

SetVar Methods (ASP)

Applies to

Template object

Syntax

<object>.SetVar VariableName,Value

Return value

None

Parameters

Name Type Description Required
VariableName string Specifies the template block or variable name in the template file bound to the template object. Yes
Value string Specifies a value that should replace the template block or variable provided as the first argument. Yes

Description

This method replaces a template block or a variable defined in the template file with the value provided as the second argument. A template variable is an identifier surrounded by curly braces (i.e. {templ_variable}. A template block is a part of the template file surrounded by two special HTML comments. One that starts the block: <!-- BEGIN block_name --> and the other that ends the block: <!-- END block_name -->.
Note: If there are multiple template blocks or variables with the same name, SetVar will replace all of them with the same value.


On-line, printable versions and updates