First entry code Tian--asp.net MVC4 Web application Create a blank MVC application

Source: Internet
Author: User
Tags sql server express

First entry code Tian--asp.net MVC4 Web application Development to achieve simple login

First entry code Tian--asp.net MVC4 Web application development of the second implementation of simple additions and deletions to search

2016-07-29

Once again, you need a computer (~ ̄▽ ̄) ~, as well as visual Studio 2013 or later, SQL Sever database (temporarily unused)

New Project

The Select template option appears below (we chose the MVC template)

Where you create an MVC template, there are authentication options, folders and core references (Web Form and Web APIs) that you can choose to add, and unit test options

Authentication is divided into four categories: 1. No authentication, 2. Personal user account, 3. Organizational account, 4.Windows authentication (we select 1. No authentication)

1. No authentication: vs does not add authentication, and users can create their own authentication mechanism for authentication.

2. Other authentication: vs will automatically generate the corresponding authentication configuration based on the selection.

Users can choose whether to add (Web Form and web API) on demand, where we don't choose.

Adding unit tests is for developers to test, and we don't choose.

Here we have created a basic blank MVC application.

This is the corresponding solution generated by vs based on previous configuration options.

Description:

1.Properties: Configuration of the various properties of the solution.

2. Reference: An assembly in the solution that can be added/removed.

3.app_data: Contains the application's local data store. It typically contains data stores in the form of files, such as Microsoft Access or Microsoft SQL Server Express databases, XML files, text files, and any other files that your application supports. The contents of this folder are not processed by ASP. This folder is the default location where the ASP. NET provider stores its own data.

3.app_start:

3.1.bundleconfig.cs: A binding configuration for CSS files with JavaScript files. For more information see http://go.microsoft.com/fwlink/?LinkId=301862

3.2.filterconfig.cs: The configuration of the filter.

3.3.routeconfig.cs: The configuration for the routing rule.

4.Content: Store the relevant CSS file.

C in 5.controllers:mvc, which is the controller.

6.fonts: The folder where the fonts are stored.

The M in the 7.MODELS:MVC is the model. In the future we can subdivide the ViewModel (view model) under this folder and store the model about the view.

8.Scriipts: Store the relevant JavaScript files.

V in 9.views:mvc, which is the view.

9.1.Shared:

9.1.1._layout.cshtml: Master page, the default template view when new views are created in the future. The new view will be in this @renderbody ().

9.1.2.error.cshtml: Error View page. (VS Auto-Create, you can modify it yourself)

9.2._viewstart.cshtml:@{layout = "~/views/shared/_layout.cshtml";} The start view template for the configuration page, by default: _layout.cshtml.

9.3.web.config: Web configuration information in the View page.

9.4. The file with the same name created by the controller: holds the individual views under the controller.

10.favicon.ico:favorites icon Abbreviation (Chinese name: website Avatar), for more information, see http://baike.baidu.com/view/1237286.htm

11.global.asax:mvc Some of the global properties of the application, such as Filterconfig, Routeconfig, and Bundleconfig.

12.packages.config:nuget Reference Package configuration file.

13.project_readme.html: Not related to the project, this is the page content that is displayed when you finish creating the VS.

14.WEB.CONFIG:MVC Web configuration file.

First entry code Tian--asp.net MVC4 Web application Create a blank MVC application

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.