Nov 30 2021 06:47 PM
I have a web application developed using ASP.NET MVC, C#, entity framework and SQL Server. I am using a rich editor to save HTML in SQL Server. I am able to render the saved html to webpage correctly using HTML.Raw
<p> @Html.Raw(item.TitleContent)</p>
But when I try to export this HTML retrieved using entity framework in my controller class to word document, the HTML formatting is getting messed up. Is there any HTML.Raw equivalent which I can use in my controller class?
Thanks.
Dec 08 2021 10:42 PM
@Gurpreet786 You may need to decode it, like this: HttpUtility.HtmlDecode(your content);