9

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);
tereško
  • 58,060
  • 25
  • 98
  • 150
Cameron McGrane
  • 4,865
  • 1
  • 20
  • 17

1 Answers1

19
 @Html.Raw( Model.description );
GvS
  • 52,015
  • 16
  • 101
  • 139
Dean
  • 1,550
  • 2
  • 15
  • 22