I have a .NET console application that needs to generate some HTML files. I could just construct the HTML in a StringBuilder and write the contents out to a file, but I was
Another option instead of using XSLT as Kev suggests is to use named string formatting. Using code like this example by Phil Haack.
Here you can have your template as a string (read from a file maybe) and format it using the given object.
Now you could do something like this:
var person = new { FirstName = "rune", LastName = "grimstad" };
string template = "Hello {FirstName} {LastName}
";
string html = NamedFormat(template, person);