I have some HTML stored in the database that looks exactly like this:
<strong><a href="http://www.google.com" target="_blank">Maintenance scheduled </a></strong>tomorrow
I want to output that to the Razor view properly formatted as HTML. I do not want to see the < and >, I just want the HTML.
You can see from this snippet that I've tried several different things:
div id="maintenanceMessage">
@*@HttpUtility.HtmlDecode(sysSettings.MaintenanceMessage)*@
@*@HttpUtility.HtmlDecode((new HtmlString(sysSettings.MaintenanceMessage)).ToString())*@
@Html.Raw(sysSettings.MaintenanceMessage)
</div>
But in every case it keeps showing it as text:
<strong><a href="http://www.google.com" target="_blank">Maintenance scheduled </a></strong>tomorrow
and not formatted HTML. I'm not sure what I am doing wrong?