I read that I could not understand the full answer of Torbjorn Nomell, he wrote that "Razor encoded everything by default is." what is the meaning of this?
They mean that the razor will give special letters to HTML characters eg .:
@ {var test = "& lt; br & gt;"; } @Test
will be generated:
& amp; Lt; Br>
If you want to write raw HTML (for example, you are trying to present rich text with HTML formatting), you should see the Html.Raw
:
@ html.Raw (test);
yield:
Comments
Post a Comment