0

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,

Murat Güzel
  • 4,986
  • 4
  • 19
  • 12

1 Answers1

1

There are many ways.

  1. Pulling a View from a database rather than a file
  2. http://razorengine.codeplex.com
  3. http://ibashir.blogspot.com/2010/11/razor-parser-without-mvc.html
  4. 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.

Community
  • 1
  • 1
Buildstarted
  • 26,529
  • 10
  • 84
  • 95