Categories
Asp, Asp.net

How To Create New Asp.Net MVC 5 Site From Empty Template

How To Create New Asp.Net MVC 5 Site From Empty Template

In this tutorial we will learn How To Create New Asp.Net MVC 5 Site From Empty Template. We will start to create a new asp.net MVC 5 site from scratch with empty template. Here we are using Visual Studio 2013 so some controls differ in another version of Visual Studio.

1. Open Visual Studio 2013.

2. Click On New Project > Visual C# > Web > Asp.Net Web Application.

MVC 5 Site From Empty Template

3. This will open a window. We want an empty MVC shell with no pre-built pages. Choose Empty (C#) and check MVC.

Create New Asp.Net MVC 5 Site From Empty Template

4. Create the Default Controller “HomeController”. Right click on Controllers and go to Add > New Scaffold Item.

1-18-2014 10-14-26 PM

5. Choose MVC 5 Controller – Empty and click Add. Change the name of the controller to HomeController so it agrees with the default in the RouteConfig.cs file.

6. Right-click on the Home folder under Views in Solution Explorer. Choose Add > MVC 5 View Page (Razor). Change the name of the view item to “Index” to match the ActionResult in the Controller.

1-18-2014 10-22-58 PM

7. Open Index.cshtml and insert Hello World!!! between the div tags on lines. Save your work and view it in browser.

1-18-2014 10-29-20 PM