In my database there is a record which include some razor 开发者_开发百科syntax like that "Hello @Model.Name, Wellcome ..." When I get this record to the view how can I render this model property ?
Thanks,
There are many ways.
- Pulling a View from a database rather than a file
- http://razorengine.codeplex.com
- http://ibashir.blogspot.com/2010/11/razor-parser-without-mvc.html
- http://blog.andrewnurse.net/2010/07/22/UsingTheRazorParserOutsideOfASPNet.aspx
I'm biased towards the RazorEngine from codeplex it's been used in the Mini-Profiler from the developers of this very site.
精彩评论