I. Conventions
1) Visual Studio 2010, hereinafter referred to as vs2010
Ii. Description
ASP. net mvc 2 is installed with vs2010. In this example, a new module is added to the ASP. net mvc 2 project created through vs2010: News management.
ASP. net mvc 2 for Visual Studio 2008 installation package download
Iii. Environment
Operating System: Windows 7 Ultimate
Data Base: SQL Server 2008 (named instance) Enterprise Edition
Development Tool: Visual Studio 2010 ultimate
Runtime Environment:. NET Framework 4.0
Iv. Table Design
Tool: Power Designer 15.0
Design a news table and add several columns: ID (Primary Key), title, category, content, and time.
Then generate a table in the SQL Server database (this step can be done directly using Power Designer ).
5. Create an ASP. net mvc 2 Project
Use file -- New -- project to open the new project window, select your development language (C # Here), and under the web template, you can find ASP. net MVC 2 web application, select and edit the name and storage path, and then create a project.
If you want to create a unit test project at the same time, select Yes, create a unit test project on the interface]
After creating a project, you can see the directory structure of the project in Solution Explorer:
The content folder is a CSS style file, and the scripts folder contains the script file, including the latest jquery script file. The MVC directory structure is clear.
The next article will add a news management module based on this project to display the news list and add, modify, delete, and browse functions.