I'm getting MvcHtmlString as a model to my view. And I need to render this string as HTML. At the moment I tried to do:
@Model.ToHtmlString()
But it gives me plaint text on my page. I know it should be like really trivial answer. But I can't get it =)
You need to use the Html.Raw
helper:
@Html.Raw(Model.ToHtmlString())
try to use
@(Model)
and implement in class the ToHtmlString()
method
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With