C# – ASP.NET MVC Razor render without encoding

asp.netasp.net-mvccnetrazor

Razor encodes string by default. Is there any special syntax for rendering without encoding?

Best Answer

Since ASP.NET MVC 3, you can use:

@Html.Raw(myString)