ASP.NET MVC Razor render without encoding

SiberianGuy picture SiberianGuy · Nov 1, 2010 · Viewed 117.3k times · Source

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

Answer

Lucas picture Lucas · Dec 21, 2010

Since ASP.NET MVC 3, you can use:

@Html.Raw(myString)