If you have used ASP or asp.net, you will find that ASP.net mvc is very similar to them, asp.net the rendering of MVC is very similar to the page of an ASP application, like a traditional asp.net Web Forms application, asp.net MVC gives you full access to the languages and classes provided by the. NET Framework.
I hope this article will give you a sense of the similarities and differences between the process of building a asp.net MVC application and building an ASP application or ASP.net Web Forms application.
Task List Application
To keep it simple, I'll just create a very simple task-list application that can do the following three things through this program:
1. List a set of tasks
2. Create a new task
3. Mark Task completed
Still, to keep it simple, I use only a few features of the ASP.net MVC framework when building a task-list application, such as I don't use test-driven development methods or HTML-assisted methods.
Prepare
To build a asp.net MVC application, use either Visual Studio 2008 or Visual Web Developer 2008 Express, and also download the ASP.net MVC framework, the download address is http:// Www.asp.net/mvc/. You can download Visual Studio 2008 for a 90-day probationary period from http://msdn.microsoft.com/en-us/vs2008/products/cc268305.aspx. If you decide to use the visual Web Developer 2008 Express, you have to install SP1, can you get from http://www.microsoft.com/downloads/details.aspx? familyid=bdb6391c-05ca-4036-9154-6df4f6debd14&displaylang=en Downloads the SP1 package for the visual Web Developer 2008 Express.
Create a asp.net MVC Web application project
Starting with creating a asp.net MVC Web application project in Visual Studio 2008, select the menu item file (file) > New project (New project), and you'll see a new Project dialog box, shown in Figure 1, Select the programming language that you are familiar with (visual Basic or Visual C #), and then select the ASP.net MVC Web application project with the project name named Tasklist and click the Save button.
Figure 1 New Project dialog box