I have text in my database that is html encoded.
In order to display it on a normal view, I use the technique described here -
@Html.Raw(encodedHtmlString)
and it displays as expected.
However, when I do the same thing in a partial view, and then render that view with .Partial
or .RenderPartial
, the text is still encoded, even though the partial view renders it with @Html.Raw().
How do you prevent the parent view from encoding text rendered in a partial view?