Razor Engine,动态脚本语言,mvc上的语法,适用于文件内容生成,静态网页生成等。

https://razorengine.codeplex.com/

下载并引用:razorengine.dll

代码里这样写,用mvc的人都会!Razor语法!

  string template = "Hello @Model.Name! Welcome to Razor!";
  string result = Razor.Parse(template, new { Name = "World" });