Dynamicweb 8 Documentation
SetTag(String,String) Method
Example 

The name of the template tag, <--@NameOfTag-->.
The value replacing the template tag specified in the name.
Specifies a tag name and value for the instance of the template object.
Syntax
'Declaration
 
Public Overloads Sub SetTag( _ 
   ByVal name As String, _ 
   ByVal value As String _ 
) 
public void SetTag( 
   string name,
   string value 
)

Parameters

name
The name of the template tag, <--@NameOfTag-->.
value
The value replacing the template tag specified in the name.
Example
Simple template usage exampleSimple template usage example
'Load a template from /Files/Templates/MyFolder/MyTemplate.html
Dim t As New Template("MyFolder/MyTemplate.html")
'Set a tag value 
t.SetTag("MyTag", "Hello world!")
'Return the parsed template
Return t.Output
//Load a template from /Files/Templates/MyFolder/MyTemplate.html
Rendering.Template t = new Template("MyFolder/MyTemplate.html");
//Set a tag value 
t.SetTag("MyTag", "Hello world!");
//Return the parsed template
return t.Output();
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

Template Class
Template Members
Overload List

Send Feedback