In this article we will see how to create a your first ASP.NET MVC Application.
Let us go ahead and see how to create and run a very basic MVC Application. Step 1: Go to Visual Studio, FILE, New, then click Project. It will open a popup. Step 2: Select Web from the left hand pane. On the right hand side Select ASP.NET MVC 4 Web Application. Step 3: Select Empty template as we do not want pre generated code and class files as of now. We will be using Razor Engine so it is auto selected and need not be changed. Click OK. Visual Studio creates the following folders under MVC project. Let us see the contents generated by the Visual Studio in the application. We get three folders named Model, View and controller. Since in MVC the user interacts with a controller so let us now add a controller to the application. Right Click on Controllers folder-> Go to Add-> Select Controllers. The following popup appears next. We will name our controller here. Name it “Home”. Controller keyword is auto appended. So it is recommended not to remove it from the textbox. We would be selecting Empty MVC controller as the template. Following is the content in the controller we just created.
ASP.NET MVC 5: A Beginner’s Guide