HomeCommunityControl GalleryMiscellaneousEmail.NET Template Engine Component for C#,VB

.NET Template Engine Component for C#,VB



Submit a Review

14 Downloads

1,455 Views


Description

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.

Syntax Example

class OrderProduct { privateint _partId; privatestring _productName; privateint _quantity; privatefloat _price; publicint PartId { get { return _partId; } set { _partId = value; } } publicstring ProductName { get { return _productName; } set { _productName = value; } } publicint Quantity { get { return _quantity; } set { _quantity = value; } } publicfloat Price { get { return _price; } set { _price = value; } } } class User { privatestring _fullName; privatestring _emailAddress; privatestring _password; publicstring FullName { get { return _fullName; } set { _fullName = value; } } publicstring EmailAddress { get { return _emailAddress; } set { _emailAddress = value; } } publicstring Password { get { return _password; } set { _password = value; } } public OrderProduct[] GetOrders() { OrderProduct[] ops = new OrderProduct[3]; ops[0] = new OrderProduct(); ops[0].PartId = 1239; ops[0].Price = 104.09f; ops[0].ProductName = "Product A"; ops[0].Quantity = 3; ops[1] = new OrderProduct(); ops[1].PartId = 22; ops[1].Price = 134.09f; ops[1].ProductName = "Product B"; ops[1].Quantity = 1; ops[2] = new OrderProduct(); ops[2].PartId = 167; ops[2].Price = 14.7f; ops[2].ProductName = "Product C"; ops[2].Quantity = 5; return ops; } } privatevoid runToolStripMenuItem_Click(object sender, EventArgs e) { try { dt.LoadFromString(txtSource.Text); dt.SetValue("CompanyName", "My Company Name"); User u = new User(); u.EmailAddress = "myemail@somedomain.com"; u.FullName = "John Borders"; u.Password = "123abc"; dt.SetValue("User", u); dt.SetValue("OrderId", "1625DGHJ"); txtOutput.Text = dt.Run(); } catch (Exception exc) { MessageBox.Show("An error occurred: " + exc.Message); } }

Screenshots

Reviews

Submit a review