Home » ASP.Net MVC Project

ASP.Net MVC Project

by Online Tutorials Library

ASP.NET MVC Project

In this topic, we are using visual studio 2017 IDE to create MVC web application. It includes the various steps that are given below. These following steps explain how to create MVC based web application.

  1. Create a Web Project
  2. Click on file menu from the menu bar and select new submenu to create a new project. The following image show that how to create a new project.

    ASP Mvc project 1

  3. Select Project Type
  4. Here, select type of project as a web project and provide name of the project.

    ASP Mvc project 2

  5. Select MVC template
  6. After selecting project type, now select the web template that we want to implement. Since we are working on MVC then select MVC template from the list of available template. At the same time, provide the authentication type to the application.

    ASP Mvc project 3

    After clicking ok, it creates a project that has following structure:

  7. MVC Web Application Project Structure
  8. Following is the project structure that we just created.

    ASP Mvc project 4

    See, the project carefully, it contains three folders named Model, View and Controller. The HomeController is default controller for the application. This controller contains the following code:


// HomeController.cs

Index file is default for the home controller in the view folder.

// index.cshtml

Output:

This project produces the following output, when view in the browser.

ASP Mvc project 5

You may also like