Possible Duplicate:
ASP.NET MVC Razor render without encoding
One of the proerties of my Product object is returning a string that has html in it. When I set the model to the view, the view reads it as text and not html. How do I let the view know to read the property as html?
<td colspan="2">
<div>
<label >
@Model.LongDescription
</label>
</div>
</td>
Razor encodes everything by default, you just have to use @Html.Raw see this question which is pretty much the same problem you have
<td colspan="2">
<div>
<label >
Html.Raw(@Model.LongDescription)
</label>
</div>
</td>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With