Microsoft MVC bloggers

Sponsors

September 2009 - Posts

Html Encoding Code Blocks With ASP.NET 4
One great new feature being introduced in ASP.NET 4 is a new code block ( often called a Code Nugget by members of the Visual Web Developer team ) syntax which provides a convenient means to HTML encode output in an ASPX page or view. <% : CodeExpression %> I often tell people it’s <%= but with the = seen from the front. Let’s look at an example of how this might be used in an ASP.NET MVC view. Suppose you have a form which allows the user to submit their first and last name. After submitting the form, the same view is used to display the submitted values. First Name: <% : Model.FirstName %> Last Name: <% : Model.FirstName %> < form method ="post" > <% : Html.TextBox( "FirstName" ) %> <...
Microsoft Ajax CDN and the jQuery Validation Library
Scott Guthrie announced the launch of the Microsoft Ajax CDN on his blog last night. If you have not read his post, I recommend that you read it now to get a general overview of the CDN and how you can take advantage of the CDN to improve the performance of your ASP.NET Web Forms and ASP.NET MVC applications: http://weblogs.asp.net/scottgu/archive/2009/09/15/announcing-the-microsoft-ajax-cdn.aspx In his announcement, Scott describes how both the ASP.NET Ajax and the jQuery libraries are included in the CDN. There is one more set of JavaScript files that we added to the CDN today that Scott did not announce: the jQuery Validation library. If you are not familiar with the jQuery Validation library then you should know that this is one of the most...
More Posts