Forum Discussion

Gurpreet786's avatar
Gurpreet786
Copper Contributor
Nov 30, 2021

exporting HTML saved in sql server to word in asp.net MVC application

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. 

 

1 Reply