Asp.net mvc3-Installation and Creation

Source: Internet
Author: User

1.1 course content

You will learn the following:

Create an ASP. NET mvc3 project.

Create an ASP. NET mvc3 controller and view ).

How to Use Entity Framework to create a database.

How to verify data.

How to add, delete, modify, and query data.

If you have not installed the Asp.net mvc3 environment, please download the complete Asp.net mvc3 installation package through the following link, with detailed installation instructions:

Asp.net mvc3 installation package download: http://www.foxitjob.com/asp-net-mvc-download

1.2 create an aps.net mvc3 ApplicationProgram

This tutorial uses vs2010, Asp.net mvc3 Chinese version as the development framework, Visual C # As the development language, click the "new project" menu item, in the open "new project" dialog box, double-click "Visual C #" on the left to make it expand. Then, click "Web" and click "ASP. net MVC 3 web application, enter the name of the application in the name text box below, name it "mvcbooks" in this tutorial, and then click OK. As follows:

In the "new ASP. in the "net MVC 3 Project" dialog box, click "Internet application" and in the "view engine" drop-down box, keep the default "Razor" option unchanged (the razor view is ASP. net mvc3 is a very important new view type. Using it can make web application development more convenient and convenient, which will be described in detail later ).

Click OK. vs2010 provides a default template for your ASP. NET MVC project. In this way, you have an application that can be run immediately. The default template provides a simple display "Welcome to ASP. net mvc !" Text application, you can use this as your development start point.

Click the "start debugging" menu item in the "debug" menu (the shortcut key for this menu item is F5). vs2010 starts a built-in server, in addition, open the home page of the current web application on this server. Note that the address of this page in the browser is "http: // localhost: 4423 /". "Localhost" represents the temporary website address of the web application you just created on the local machine, and 4423 represents a random port used by vs2010, vs2010 uses this port as the port number of the built-in server. On each computer, the port number is different because it is randomly selected by vs2010.

In the upper-right corner of the template application page, two buttons are provided with a "login" link, click the "login" link, the page jumps to the login page, click the "home" button, return to the home page and click "about" to go to the "about" page.

Next, let's begin to gradually change this default application to the application we want, and gradually learn about ASP. net mvc 3 in this process. First, let's close the browser and startCode.

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.