【发布时间】:2019-08-09 09:18:41
【问题描述】:
我得到了 html 标记的字符串,例如
<p>I want to trip/remove seconds from date time.
I checked some solution but showing solution using
format string like
</p>
<pre><code class="language-c#">
DateTime datetime = DateTime.UtcNow;
</code></pre>
作为我的 controlers 操作的结果 传递到 view。如何从 html 将其解码为 html 格式?或者也许我可以在我的 action 中生成 html 页面并将其附加到现有文档中?
【问题讨论】:
-
看看Expression encoding。请注意警告。
标签: c# html asp.net-core razor