【发布时间】:2016-08-14 08:31:25
【问题描述】:
我有一个 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 格式。任何人都可以帮助解决我遇到的问题吗?
【问题讨论】:
标签: c# asp.net asp.net-mvc asp.net-mvc-4 razor