Can I create not .cshtml
file (.txt
, .js
...), inclu开发者_开发百科de Razor operators in it and parse in runtime using Razor engine (in web or desktop .NET application)?
Yes you can, just take a look at the RazorEngine on codeplex. Razor is just a templating engine that could be used in any application including console, desktop, ... and it is not tightly coupled coupled to an HttpContext
like the WebForms pseudo view engine.
精彩评论