Does ASP.NET MVC razor view engine encode HTML by default?
Or do we have to use the htmlhelpers
for html encoding the data.
Yes it does. Use @Html.Raw(...)
to break that behavior.
Or use HttpUtility.HtmlDecode
string value1 = "<html>"; // <html>
string value2 = HttpUtility.HtmlDecode(value1); // <html>
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