asp.net MVC Tutorial: Understanding Models, views, and controllers

Source: Internet
Author: User
Tags visual studio

asp.net MVC Application Sample

When you create a asp.net MVC Web application with the Visual Studio default template, you create a very simple instance program that you can use to help you understand the components of the ASP.net MVC program, which we'll explain with this example.

Click File > New project in Visual Studio 2008, select the asp.net MVC template to create a asp.net MVC application, as shown in Figure 1, in the New Project dialog box, select your familiar programming language under the project type, such as visual Basic or C #, then select the "ASP.net MVC Web Application" template under the template and click the OK button.

Figure 1 New Project dialog box

When you create a new asp.net MVC application, a dialog box is displayed for creating a new unit test project, as shown in Figure 2, which allows you to create a separate project for your solution to test your asp.net MVC application, where you select the option "No, don't create a test project", Then click the OK button.

Figure 2 Creating a Unit Test dialog box

After creating the ASP.net MVC application, you will see a few folders and files in the Scenario Browsing window, specifically, you will see the model (Models), view (views) and controller (controllers) three folders, as you can guess from the names of these folders, These folders include the implementation files for models, views, and controllers.

Related Article

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.