NetXtremeDynamicTemplate is a .NET Template Engine for generating formatted text output from source template and input variables. Examples of such output includes Web Pages, Emails, Source Code, etc. By using NetXtremeDynamicTemplate you can strictly enforce a clean separation of design and development (MVC) on your web application.
NetXtremeDynamicTemplate is also included in the following suites which are bundles that include many additional components:
Sample Usage - Easily personalize an e-mail content sending to customers:
public class Author
{
public string Name
{
get { return "John Borders"; }
}
}
public class Book
{
public int BookId
{
get { return 100; }
}
public Author Author
{
get { return new Author(); }
}
}
[STAThread]
static void Main()
{
// Create a new instance of the NetXtremeDynamicTemplate class.
NetXtremeDynamicTemplate dt = new NetXtremeDynamicTemplate();
// Load template from a string.
dt.LoadFromString("ID: $bk.BookId$ - Author: $bk.Author.Name$" +
"\r\n" +
"Length of the author's Name: " +
"$bk.Author.Name.Length$");
Book book = new Book();
// Assign template's variable to the newly created object.
dt.SetValue("bk", book);
// Generate output.
string output = dt.Run();
Console.WriteLine(output);
}
Public Class Author
Public ReadOnly Property Name() As String
Get
Return "John Borders"
End Get
End Property
End Class
Public Class Book
Public ReadOnly Property BookId() As Integer
Get
Return 100
End Get
End Property
Public ReadOnly Property Author() As Author
Get
Return New Author()
End Get
End Property
End Class
Sub Main()
' Create a new instance of the NetXtremeDynamicTemplate class.
Dim dt As New NetXtremeDynamicTemplate()
' Load template from a string.
dt.LoadFromString("ID: $bk.BookId$ - Author: $bk.Author.Name$" _
& Chr(13) & Chr(10) & _
"Length of the author's Name: " & _
"$bk.Author.Name.Length$")
Dim book As New Book()
' Assign template's variable to the newly created object.
dt.SetValue("bk", book)
' Generate output.
Dim output As String = dt.Run()
Console.WriteLine(output)
End Sub
More samples:
Click on
tab to see more samples.
Royalty-FREE Licenses
Prices include royalty-free distributation, for unlimited site deployment.
Click on the desired license below to add it to your cart.