【发布时间】:2015-12-08 17:49:28
【问题描述】:
我的 web.config 文件有以下内容:
<applicationSettings>
<MyProject.Properties.Settings>
<setting name="TermsAndConditions" serializeAs="String">
<value><p>
My text here...
</p>
</value>
</setting>
</MyProject.Properties.Settings>
</applicationSettings>
然后在我的控制器中:
ViewBag.terms = Properties.Settings.Default.TermsAndConditions;
最后,在我的观点中:
<div class="col-lg-2">
@ViewBag.terms
</div>
网页上显示的内容实际上是下面的内容,而不是 <p> 标记被转换为 HTML:
<p> My text here... </p>
知道如何将标签转换为 HTML 吗?
【问题讨论】:
标签: c# html asp.net-mvc