In this article, we will be learning about the new MVC3 framework by using Visual Studio 2010. This article would be a beginner’s guide on how to build your first MVC3 Application using Razor View Engine.
I assume that you have Visual Studio 2010 Installed on your workstation, For this lesson you may use Visual Studio Express edition that is free to download from here.
We will start by creating a new ASP.NET MVC3 Web Application. Start by clicking File->New->Project.
We will be selecting ASP.NET MVC3 Web Application and since this is going to be our first application we will call it MyMVC3App.
Next Visual Studio 2010 will prompt you to choose a project template. Currently Visual Studio 2010 has an Empty Template and Internet Application template. Empty Template is nothing but an empty website without any site structure of pages on the other hand Internet Application is a generic template that has a built in template consisting of pages, controllers, views and model.
For our first application we will be choosing Internet Application Template, and for our View Engine we will be selecting Razor.
Note: By selecting Razor, we will be able to use the new Razor View Engine that comes up with MVC3.
On Clicking Ok, our web application would be created based upon the internet Application template that we chose earlier. Now let’s pay some attention on our solution explorer. You will find out that it does not have a folder structure like we used to have with ASP.NET Web Applications. It now has folders named Controllers, Views and Models.
Let’s run our application by pressing F5. Voila!!! Our very first MVC3 Web Application by using Razor View Engine is running🙂
In the upcomming articles i am going to discuss about how the MVC3 framwork works and how to use Razor View Engine in our Views.