I\'m using Razor in MVC 3 and Asp.net C#.
I have a View with the following code. model.ContentBody has some HTML tags.
model.ContentBody
I would need display this HTM
Pass in "ContentBody" as MvcHtmlString to your model instead of a string.
This way you can just use:
@model.ContentBody
in your controller to get a MvcHtmlString just use:
MvcHtmlString myHtmlString = MvcHtmlString.Create("htmlcodeandtext");