Printable Version
 Updates

 Documentation

 Support & Training

 Community
  Online Forum
  Newsgroups
What is the equivalent of CodeCharge SetVar function in CodeCharge Studio?

Products:   
Areas: ASP, General 

The SetVar function is used in CodeCharge to programmatically replace custom tags in curly brackets, such as {my_tag}, with another value.
In CodeCharge Studio, the same may be achieved in several ways (ASP/VBScript):

1. Place a control (such as a Label) on the page and then use "Before Show" event for this control with the following code:
   EventCaller.Value = "test"

2. Place a control (such as a Label) on the page and then use any event, where you can place the following code:
   Label1.Value = "test"
(replace "Label1" with the name of your control)

3. Place custom tag in curly brackets anywhere on the page, for example {my_tag}, then use any event with the following code:
   Tpl.Variable("my_tag") = "test"
or
   HTMLTemplate.setvar "@my_tag", "test"
(replace my_tag with the text you placed in curly brackets)


Viewed 13344 times.   Last updated: 9/19/2002 1:41:14 AM