Dynamicweb 8 Documentation
Template Constructor(String)
Example 

The path to the template relative to /Files/Templates directory, i.e. "MyModule/item.html" to load a template from /Files/Templates/MyModule/item.html.
Initializes a new instance of the Template class and loads a template into the object.
Syntax
'Declaration
 
Public Function New( _ 
   ByVal path As String _ 
)
public Template( 
   string path 
)

Parameters

path
The path to the template relative to /Files/Templates directory, i.e. "MyModule/item.html" to load a template from /Files/Templates/MyModule/item.html.
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