I've searched the internet for days now with no luck finding this.My model has a property which holds a chunk of html containing Razor markup.exmaple: \[code\]public class ViewModel { public string Content = "<div>@Html.TextBox(\"UserName\")</div>";}\[/code\]In the view, I display that with\[code\]@Html.Raw(Server.HtmlDecode(Model.Content).toString())\[/code\]I need to be able to convert the Razor markup into html, although because the Content is dropped in through the model, the view engine doesn't process it.
- I have tried simply dropping in the Content, using just .Raw(Model.Content), .Encode(Model.Content), nothing works.