Go Introduction to ASP. 2, the directory structure of the project and the core DLL

Source: Internet
Author: User

After we create a new ASP. NET MVC Web application, by default, the project directory structure is as follows:

    • App_Data : This directory is the same as our general ASP. NET website, for storing data.
    • content : This directory is recommended for storing resource files. such as CSS, JS, pictures and so on. Of course, if you don't want to, you can totally not put it here.
    • Controllers : This directory is recommended to put the controller class here, easy to manage. The name of the Controller class must end with a controller, for example, a controller named home is named HomeController.
    • Models : This directory is a class that is recommended for storing your business entities, data access layer code. Of course, the better way I think it should be to separate the models into a class library.
    • Views: By default , all view files must be placed in this directory, each controller corresponds to a subdirectory, and the name of the subdirectory must be named the controller. For example, the HomeController view should be placed in the home subdirectory. We see a shared subdirectory under the Views directory, which is used to store some shared views, such as error.aspx and Site.master. When the controller cannot find the specified view in the Views\controllernmae, it goes to Gkfx to find it.

Let's take a look at ASP. NET MVC comparison core DLL, see the Red box section:

System.Web.Routing : URL routing. This is the way to route a URL to the corresponding controller. is dealt with in HttpModule.

System.Web.Extensions : This is ASP. NET AJAX.

SYSTEM.WEB.MVC: The most important assembly for ASP. It is this DLL that releases the source code on the CodePlex.

System.Web.Abstractions : This assembly is a collection of related base classes. such as HttpContextBase, Httprequestbase and so on.

MiCrosoft. WEB.MVC : This assembly simply puts in some MVC features and extended methods. In the ASP. NET MVC Beta, this DLL has been removed, but if you need the functionality of this DLL, you can download it here and introduce it.

We can build a generic webappliction in the VS08, and then introduce these DLLs, and then configure the Web. config file, then you can become an ASP. NET MVC application.

Go Introduction to ASP. 2, the directory structure of the project and the core DLL

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.