What’s New in ASP.NET MVC 2


This Wrox Blox is for .NET developers who already have experience developing web applications with ASP.NET MVC and want to learn the new features introduced in the new release of ASP.NET MVC. ASP.NET MVC 2 has been built with the goal to increase productivity and make ASP.NET MVC ready for enterprise development. This Wrox Blox guides the reader through the new features by explaining how to use data scaffolding and automatic validation, how to write custom validators, how to create multi-area projects, and how and when to use async controllers. It also covers the new automatic HTML Encoding feature introduced in ASP.NET 4 and how it helps increasing the security of ASP.NET MVC web applications. In addition, it provides examples built both with Visual Studio 2010 and with the still supported Visual Studio 2008.

Table of Contents

Introducing ASP.NET MVC 2 1
Runs on Visual Studio 2008 and Visual Studio 2010 2

Templated Helpers and Model Metadata 2
HiddenInputAttribute 5
How to Write Custom Templates 7
Validation 8
Client-Side Validation 10
Custom Validation Rules 10

Areas 15

Asynchronous Controllers 18
Why Asynchronous Operations Matter 18
The Anatomy of an Asynchronous Controller 18
How to Implement an Async Controller 19
When to Use an Async Controller 21

RenderAction and Child Actions 22

Strongly Typed UI Helpers 24

Enhancements to ModelBinders 25
Default Value 25
Increasing Security with HTTPS 26
Avoiding the JSON Array Attack 26
Short Notation for AcceptVerbs Attribute 27
Overriding the HTTP Verb 27
Binary Binding 28

Automatic HTML-Encoding 29

Enhanced Visual Studio Tooling 30

Summary 31

About Simone Chiaretta 32

Book Details

  • Paperback: 35 pages
  • Publisher: Wrox (May, 2010)
  • Language: English
  • ISBN-13: 978-0470767481
Download [9.4 MiB]

You may also like...

No Responses

  1. MVC Lover says:

    it must be a very useful book for whom know ASP.net MVC now

Leave a Reply