Chapter 1 of asp.net mvc3 Advanced Programming

Source: Internet
Author: User

Mvc2 has been used in previous projects. Although mvc4 has already come out, it only has mvc3 books on hand. Simply learn MVC3.

Asp.net mvc 3 Overview

(1) friendly attempt to express, including the new Razor view Engine

(2) Support for. NET4 data Annotation

(3) improved model verification and funny verification Introduction

(4) strong association with Dependency Resolution and Global Action Filters

(5) rich JavaScript support, including non-intrusive JavaScript, jQuery verification, and JSON binding

(6) NuGet

 

Create an ASP. net mvc 3 Application

Create a new ASP. net mvc project:

(1) Select | new | select ASP. NET MVC3 Web application in the project dialog box, as shown in Figure 1-1:

(2) create a new ASP. net mvc 3 application, a temporary dialog box with specific options of MVC appears. In this dialog box, you can set most of the infrastructure of the application, from account management to view engine to test, if 1-2 is shown:

1. The three application templates are:

Empty template: most of the content of this template is empty, but the project still contains basic folders, CSS, and the basic structure of ASP. net mvc applications. In addition, there is no other content.

Internet Application Template: This template contains the startup method of ASP. net mvc Web application, and some pages. Includes basic account management functions for the asp.net Membership system.

Intranet application template: It is updated as part of the asp.net mvc tool in Tianjin. It is intended for Internet application templates, but its account management function is not for ASP. NET Membership is for Windows accounts.

2. View Engine

Razor is added to ASP. NET MVC3 in addition to ASPX. We will explain Razor in the future.

3. Test

You can create unit test projects.

 

Select an Internet Application Template and click OK to create an ASP. NET MVC application, as shown in figure 1-3:

Structure of ASP. net mvc applications

The asp.net mvc project contains six top-level directories by default, as shown in figure 1-4.

 

 

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.