4
我有一个SQL表格,其中包含显示文本的HTML格式。ASP.Net MVC 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格式。任何人都可以帮助解决我遇到的问题吗?
谢谢你这工作:) – TerrorTot38
@ TerrorTot38 ..你欢迎。 –