I came over the following problem during creating my homepage.
I have a database which contains a comment from an user. This comment should be able to contain HTML elements for formatting and high flexibility.
Text in database cell (Type: ntext):
Hi, I'm a <b>Comment</b>
Code in .cshtml file:
<p>@textfromdb</p>
What is displayed on the website:
Hi, I'm a <b>Comment</b>
What should be displayed on the website:
Hi, I'm a Comment
Is it possible to somehow render that string to a valid HTML string? I sadly did not found any useful information on Google, mainly due to a lack of the right keywords I think.
Thanks for your help!