I have an SQL table that contains HTML formatting for the displayed text.
<strong>What Is EDI ?</strong><p>EDI is a method for communicating electronically with trading partners based upon standards.</p>
In my MVC application there is an index.cshtml page below:
<h2>Index</h2>
<table>
<tr>
<th> @Html.DisplayNameFor(model => model.Body)</th>
<th></th>
</tr>
@foreach (var item in Model) {
<tr>
<td>@Html.DisplayFor(modelItem => item.Body)</td>
</tr>
}
</table>
The problem is that the text looks fine without HTML formatting. Can anyone help solve the problem I am having?
source
share