gpt4 book ai didi

html - 从 mvc3 中的模型属性插入时,实际的 html 标记不是 html 实体

转载 作者:太空狗 更新时间:2023-10-29 13:39:17 25 4
gpt4 key购买 nike

它可能不是特定于 mvc3 的,但是当我在我的 razor View 中插入一个属性时

@Model.description

包含 html 标记

P><STRONG>ASSOCIATE MEMBERSHIP</STRONG><BR><BR>Individuals who are interested in being involved with the SWPRG by submitting photo's, investigation reports, attending monthly meetings, leads, stories and talking to our On-Site Team Members about cases and other issues. <BR><STRONG><EM>BENEFITS INCLUDE:</EM></STRONG><BR>-

浏览器使用 HTML 实体呈现 html

lt;P&gt;&lt;STRONG&gt;ASSOCIATE MEMBERSHIP&lt;/STRONG&gt;&lt;BR&gt;&lt;BR&gt;Individuals who are interested in being involv

如何注入(inject)要呈现为 HTML 的 HTML?

@HTML.??(@Model.description);

最佳答案

 @Html.Raw( Model.description );

关于html - 从 mvc3 中的模型属性插入时,实际的 html 标记不是 html 实体,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5073789/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com