Generating HTML using a template from a .NET application

前端 未结 6 614
后悔当初
后悔当初 2021-01-04 20:35

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

6条回答
  •  春和景丽
    2021-01-04 21:39

    As Matt mentioned, spark is nice but it could be overkill for some simple templates and gets complicated if you are not using it in MVC.

    I have personally had a lot of success with NVelocity and I also publish a simple example/wrapper on using it: http://simpable.com/code/simpletemplate/

    In addition, GraffitiCMS's entire theming system run on NVelocity (although I would have used spark if it were available for this task).

    -Scott

提交回复
热议问题