Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

ASP.NET MVC Introduction

ASP.NET MVC Tutorial

ASP.NET is a development framework for building web pages and websites using HTML, CSS, JavaScript, and server-side scripts.

ASP.NET supports three different development models:
Web Pages (Web Pages), MVC (Model View Controller), Web Forms (Web Forms).

This tutorial introduces MVC。

Web Pages MVC Web Forms

The MVC programming model

MVC is one of the three ASP.NET programming models.

MVC is a pattern for creating web applications using the MVC (Model View Controller) design:

The MVC pattern also provides full control over HTML, CSS, and JavaScript.


| MVC |

The MVC pattern defines a web application as
having three logical layers:

Business layer (model logic)

Display layer (view logic)

Input control (controller logic)

| | --- | --- |

The **Model** is the part of the application that handles the application's data logic.
Typically, model objects are responsible for reading and writing data in the database.

The **View** is the part of the application that handles data display.
Typically, the view is created based on the model data.

The **Controller** is the part of the application that handles user interaction.
Typically, the controller is responsible for reading data from the view, controlling user input, and sending data to the model.

MVC layering helps manage complex applications because you can focus on one aspect at a time. For example, you can focus on view design without depending on business logic. It also makes testing the application easier.

MVC layering also simplifies group development. Different developers can simultaneously develop the view, controller logic, and business logic.


Web Forms vs MVC

The MVC programming model is a lightweight alternative to traditional ASP.NET (Web Forms). It is a lightweight, highly testable framework that integrates all existing ASP.NET features, such as master pages, security, and authentication.


Visual Studio Express 2012/2010

Visual Studio Express is the free version of Microsoft Visual Studio.

Visual Studio Express is a development tool tailored for MVC (and Web Forms).

Visual Studio Express includes:

If you have already installed Visual Studio Express, you will learn more from this tutorial.

If you want to install Visual Studio Express, please click one of the links below:

Visual Web Developer 2012(Windows 7 or Windows 8)

Visual Web Developer 2010(Windows Vista or XP)

lamp After you install Visual Studio Express for the first time, you can install patches and service packs by running the installer again; just click the link again.

ASP.NET MVC Reference Manual

At the end of this tutorial, we provide a complete ASP.NET MVC reference manual for your reference.