Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Actual html markup not html entity when inserted from model property in mvc3

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);
like image 569
Cameron McGrane Avatar asked Feb 22 '11 03:02

Cameron McGrane


1 Answers

 @Html.Raw( Model.description );
like image 79
Dean Avatar answered Oct 26 '22 21:10

Dean