Tuesday, July 27, 2010

Code Nuggets in ASP.NET/MVC

Important Note

Note: Prior to ASP.NET 4, the <%= %> syntax was used to execute code and write it out to the page. Starting with ASP.NET 4, you should always use the <%: %> syntax instead, since it will automatically HTML Encode the results, similar to how we used Server.HtmlEncode() in our controller action earlier.

No comments: