Create a blank MVC application with ASP. NET MVC4 Web application and asp. netmvc4
Simple logon is implemented in ASP. NET MVC4 Web application development.
Initial entry field -- ASP. NET MVC4 Web application development II to achieve simple addition, deletion, modification, and query
2016-07-29
Before you start again, you need a computer (~ )~, And Visual Studio 2013 or later, SQL Sever database (not required for the time being)
Create a project
Select the template option (MVC template is selected)
Authentication options, folders and core references (Web Form and Web API) and unit test options are available when creating the MVC template.
There are four types of authentication: 1. No authentication, 2. Individual user account, 3. Organization account, 4. Windows authentication (Here we select 1. No Authentication)
1. No Authentication: VS does not add authentication. You can create an authentication mechanism for authentication.
2. Other authentication: VS will automatically generate the corresponding authentication configuration based on the selected identity.
You can select whether to add (Web Form and Web API) as needed.
Add Unit Tests for developers. We do not select this option.
At this point, we have created a basic blank MVC application.
This is the solution that VS generates based on the previous configuration options.
Description:
1. Properties: configuration of various Properties of the solution.
2. Reference: the assembly in the solution, which can be added or deleted.
3. App_Data: local data storage that contains applications. It usually contains data storage in the form of files (such as Microsoft Access or Microsoft SQL Server Express database, XML files, text files, and any other files supported by the application. The content of this folder cannot be processed by ASP. NET. This folder is the default location for ASP. NET providers to store their own data.
3. App_Start:
3.1.BundleConfig.cs: configuration for binding JavaScript files in CSS files. View http://go.microsoft.com/fwlink/ for details? LinkId = 301862
3.2.FilterConfig.cs: filter configuration.
3.3.RouteConfig.cs: Configure routing rules.
4. Content: stores related CSS files.
5. Controllers: C in MVC, that is, controller.
6. fonts: a folder for storing fonts.
7. Models: M in MVC, that is, model. In the future, we can split the ViewModel in this folder to store the model of the view.
8. Scriipts: stores JavaScript files.
9. Views: V in MVC, that is, view.
9.1.Shared:
9.1.1. _ Layout. cshtml: master page. The default template view is used to create a new view. All newly created views are in @ RenderBody.
9.1.2.Error.cshtml: Error view page. (VS is automatically created and can be modified on its own)
9. 2. _ ViewStart. cshtml: @ {Layout = "~ /Views/Shared/_ Layout. cshtml ";} Configure the start view template of the page. The default value is _ Layout. cshtml.
9.3.Web.config: Web configuration information on the view page.
. File of the same name created by the corresponding Controller: each view under the controller is stored.
10. favicon. ico: Favorites Icon abbreviation (Chinese name: website profile picture), for more information, see the http://baike.baidu.com/view/1237286.htm
11. Global. asax: Global attributes of MVC applications, such as FilterConfig, RouteConfig, and BundleConfig.
12. packages. config: Nuget references the package configuration file.
13.Project_Readme.html: The page content displayed after VS is created.
14. web. config: MVC Web configuration file.
I am a beginner. If you have any questions, please forgive me. I hope you can give me more comments. Thank you !!!
========================================================== ========================================================== ========================
Author: Cheng
Source: http://rcddup.cnblogs.com
This article was originally published by Cheng and published to the blog Park. You are welcome to repost it, but the author and source must be clearly indicated on the article page. Thank you very much!