Actual html markup not html entity when inserted f

2019-04-23 17:09发布

It probably isn't mvc3 specific but when I insert a property in my razor view

@Model.description

containing html markup

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>-

the browser renders the html with HTML Entities

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

How do I inject the HTML to be rendered as HTML?

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

1条回答
forever°为你锁心
2楼-- · 2019-04-23 17:15
 @Html.Raw( Model.description );
查看更多
登录 后发表回答