I have the following text in the model object, <b>Hello<b>
which i need to display as Hello
But I get the following output <b>Hello<b>
instead of Hello
I did the following in the .cshtml file
<td>@WebUtility.HtmlDecode(lookup.LookupTextDesc)</td>
What needs to be done so as to get the html rendered output?
CodePudding user response:
Use @Html.Raw(your object value)
to render as html inside view. Btw <b>Hello<b>
should be <b>Hello</b>
if it's html.