我有一个SQL表,其中包含所显示文本的HTML格式。
<strong>What Is EDI ?</strong><p>EDI is a method for communicating electronically with trading partners based upon standards.</p>
在我的MVC应用程序中,下面有一个index.cshtml页面:
<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>
问题是文本没有HTML格式显示为正常。有人可以帮助解决我遇到的问题吗?
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句