A
A
Alyosha2018-02-18 13:13:06
SQL
Alyosha, 2018-02-18 13:13:06

How to make ASP.NET output html code from the database?

I am making a blog, there is a database in which I store the content of the page and, of course, I have all sorts of html tags there, for example < h5 > Text < / h5 > it displays to me as: & lt; h5 & gt; Text & lt; / h5 & gt; This is if you click to see the source code of the page. And I need the html tags to work fine, how to do it?
Example of my output:
foreach (var item in Model)
{
ITem .Content
}
5a8952be5c5d6614010035.png5a8952c3503ce983332859.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
DoctorPro, 2018-02-18
@digna

Try like this @Html.Raw(ITem.Content)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question