Share via


ASP.NET MVC 2

The Model-View-Controller (MVC) pattern is an architectural design principle that separates the components of a Web application. This separation gives you more control over the individual parts of the application, which lets you more easily develop, modify, and test them.

ASP.NET MVC is part of the ASP.NET framework. Developing an ASP.NET MVC application is an alternative to developing ASP.NET Web Forms pages; it does not replace the Web Forms model.

If you have installed Visual Studio 2010, ASP.NET MVC 2 is already installed on your computer. You can get the most up-to-date version of the ASP.NET MVC 2 framework from the ASP.NET MVC download page.

Note

An earlier version of the MVC Framework (ASP.NET MVC 1.0) is also available. If you are working with an application that is specifically written to work with that version of the MVC framework, you can download ASP.NET MVC 1.0 from the ASP.NET MVC 1.0 page on the Microsoft Download Center.

Content Map for ASP.NET MVC

We suggest the following progression of documentation to help you learn about ASP.NET MVC. You can download complete example projects from the ASP.NET MVC 2 Code Examples page on the MSDN Web site.

Note

Additional information is available in blog entries written by ASP.NET MVC experts. For more information, see Blog Entries About ASP.NET MVC later in this document.

Scenario

Topics

Getting started with ASP.NET MVC

ASP.NET MVC Overview

Walkthrough: Creating a Basic MVC Project with Unit Tests in Visual Studio

Creating a Tasklist Application with ASP.NET MVC (video on the ASP.NET Web site)

MVC FAQ

Tips on getting your ASP.NET MVC questions answered quickly (blog entry)

See also: Blog Entries About ASP.NET MVC later in this document.

Familiarizing yourself with ASP.NET MVC classes

System.Web.Mvc namespace

System.Web.Mvc.Ajax namespace

System.Web.Mvc.Async namespace

System.Web.Mvc.Html namespace

Understanding models, views, and controllers

Controllers and Action Methods in ASP.NET MVC Applications

Views and UI Rendering in ASP.NET MVC Applications

Models and Validation in ASP.NET MVC

Using an Asynchronous Controller in ASP.NET MVC

Understanding Models, Views, and Controllers (video on the ASP.NET Web site)

Episode 1 with Paul Litwin - Creating a Data Driven MVC Application (video on the ASP.NET Web site)

Episode 2 with Paul Litwin - Creating the Controller and View (video on the ASP.NET Web site)

Understanding ASP.NET MVC project structure

MVC Framework and Application Structure

Understanding the MVC Application Execution Process

Walkthrough: Organizing an ASP.NET MVC Application using Areas

Understanding URL routing in ASP.NET MVC

ASP.NET Routing

Working with views

Rendering a Form in ASP.NET MVC Using HTML Helpers

Passing Data in an ASP.NET MVC Application

Walkthrough: Using Templated Helpers to Display Data in ASP.NET MVC

Creating an ASP.NET MVC View by Calling Multiple Actions

Creating Custom HTML Helpers (tutorial on the ASP.NET Web site)

Creating Page Layouts with View Master Pages (video on the ASP.NET Web site)

See also: Blog Entries About ASP.NET MVC later in this document.

Working with models

Walkthrough: Using MVC View Templates with Data Scaffolding

How to: Validate Model Data Using DataAnnotations Attributes

How to: Implement Remote Validation from a Client in MVC

Creating Model Classes with LINQ to SQL (tutorial on the ASP.NET Web site)

Displaying a Table of Database Data (tutorial on the ASP.NET Web site)

Creating Model Classes with the Entity Framework (tutorial on the ASP.NET Web site)

See also: Blog Entries About ASP.NET MVC later in this document.

Creating helpers

Creating Custom HTML Helpers (tutorial on the ASP.NET Web site)

DRY-ing out the MVC Templated Helpers (blog entry)

Using AJAX in ASP.NET MVC applications

Walkthrough: Adding ASP.NET AJAX Scripting to an MVC Project

See also: Blog Entries About ASP.NET MVC later in this document.

Filtering action methods

Action Filtering in ASP.NET MVC Applications

Creating Custom Action Filters

How to: Create a Custom Action Filter

Handling errors in MVC applications

HandleErrorAttribute class

Securing MVC applications

Securing your MVC Application

Walkthrough: Using Forms Authentication in ASP.NET MVC

AuthorizeAttribute class

Preventing JavaScript Injection (XSS) Attacks (tutorial on the ASP.NET Web site)

Preventing Cross-Site Request Forgery (CSRF) attacks (tutorial on the ASP.NET Web site)

SQL Injection (SQL Server 2008 Books Online)

How To: Protect From SQL Injection in ASP.NET (Patterns & practices)

Authenticating Users with Forms Authentication (tutorial on the ASP.NET Web site)

Authenticating Users with Windows Authentication (tutorial on the ASP.NET Web site)

See also: Blog Entries About ASP.NET MVC later in this document.

Improving ASP.NET MVC application performance

OutputCacheAttribute class

Adding Dynamic Content to a Cached Page (tutorial on the ASP.NET Web site)

Testing MVC applications

How to: Add a Custom ASP.NET MVC Test Framework in Visual Studio

Walkthrough: Creating a Basic MVC Project with Unit Tests in Visual Studio

Creating Unit Tests for ASP.NET MVC Applications (tutorial on the ASP.NET Web site)

Deploying MVC applications

Using ASP.NET MVC with Different Versions of IIS (tutorial on the ASP.NET Web site)

Blog Entries About ASP.NET MVC

The following blog entries provide additional information about how to work with ASP.NET MVC.