摘要:
Razor引擎下载地址:http://github.com/Antaris/RazorEngine解析Model: string template = "Hello @Model.Name! Welcome to Razor!"; string result = Razor.Parse(template, new { Name = "World" });使用Helper:string template = @"@helper MyMethod(string name) { Hello @name } @MyMethod(Model.Name)! 阅读全文