1. @ (Mvc 3 Razor syntax)
2. <%: which both automatically html encode the output to help prevent against XSS (Cross Site Scripting) attacks. This was lacking for data binding syntax for example:
This above syntax had no html encoding and you specifically had to call it
<%# Eval("FirstName") %>
<%# HttpUtility.HtmlEncode((string)Eval("FirstName")) %>
In the future you will be able to just:
<%#: Eval("FirstName") %>
This new syntax will be available in the next version of asp.net (4.1?)
Thank you for posting this very relevant article. Those who are in web development outsourcing will surely find this as informative. Cheers!
ReplyDelete