ASP. net mvc Tutorial: Create a TaskList application (1)

Source: Internet
Author: User

BKJIA quick translation: If you have used ASP or ASP. NET, you will find ASP. net mvc and they are very similar, ASP. the presentation of net mvc is very similar to that of ASP application pages, just like the traditional ASP. NET Web form application, ASP. net mvc allows you to access it completely.. NET Framework.

I hope this article will show you the similarities and differences between building an ASP. NET MVC application and an ASP. NET Web form application.

Task List Application

To keep it simple, I only create a very simple task list application, which can be used to do the following three things:

1. List a set of tasks

2. Create a new task

3. The tag task has been completed.

To keep it simple, I only use ASP when building a task list application. net mvc Framework is a small part of the features, for example, I will not use the test-driven development method or HTML-assisted method.
Preparation

To build an ASP. net mvc application, you must use Visual Studio 2008 or Visual Web Developer 2008 Express and download the ASP. net mvc Framework http://www.asp.net/mvc /. You can download Visual Studio 2008 of the 90-day warranty period from http://msdn.microsoft.com/en-us/vs2008/products/cc268305.aspx. If you decide to use Visual Web Developer 2008 Express, you must install SP1, which can be from the http://www.microsoft.com/downloads/details.aspx? FamilyId = BDB6391C-05CA-4036-9154-6DF4F6DEBD14 & displaylang = en download Visual Web Developer 2008 Express SP1 package.

Create an ASP. net mvc Web Application Project

Create an ASP. net mvc Web application Project start, select the menu item File)> New Project), you will see a New Project dialog box shown in 1, select the familiar programming language Visual Basic or Visual C #), and then select ASP.. net mvc Web application project. The project name is Tasklist, and then click Save.


Figure 1 Create Project dialog box

No matter when you create ASP. net mvc Web application project, Visual Studio will prompt you to create an independent unit test project, as shown in Figure 2. Due to time constraints, we will not create a test project in this article, so select "No" and click "OK.

 
Figure2Create unit test project dialog box

ASP. net mvc applications also have standard folders: module Models, view Views), and controller Controllers. In the Solution Explorer) window, you should be able to see these folders. We also need to complete our Tasklist application to the conditional files in the models, Views, and Controllers folders.

When you use Visual Studio to create a new ASP. net mvc application, you will get a sample application, because we want to start from scratch, so we need to delete the content of these sample applications, to delete the following files and folders:

Controllers \ HomeController. cs

Views \ Home


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.