You may take a look at the following blog post which illustrates how you could use the Razor view engine to render a template to a string.
You may take a look at the following blog post which illustrates how you could use the Razor view engine to render a template to a string.