How to Create First Asp.net MVC Web Application for Beginners

 Admin   
169 View    Jan 16 2020 11:42PM

In this section, we will create a new MVC (Model View Control) web application using visual studio and understand the basic building blocks of Asp.net MVC Application.

First, setup a development environment to develop an ASP.NET MVC 5 application.

Setup Development Environment

You can develop ASP.NET MVC application with appropriate version of Visual Studio and .NET framework, as you have seen in the previous section of version history.

Here, we will use MVC v5.2, Visual Studio 2017 Community edition and .NET framework 4.6 to create our first MVC application.

Download the latest version of Visual Studio from

 https://visualstudio.microsoft.com/downloads

Create first simple MVC application

Open a Visual Studio 2017 Community edition and select File menu -> New -> Project as shown below.

 

From the New Project dialog as shown below, expand Visual C# node and select Web in the left pane, and then select ASP.NET Web Application (.NET Framework) in the middle pane. Enter the name of your project MyMVCApplication. (You can give any appropriate name for your application). Also, you can change the location of the MVC application by clicking on Browse... Button. Finally, click OK.

From the New ASP.NET Web Application dialog, select MVC (if not selected already) as show below

You can also change the authentication by clicking on Change Authentication button. You can select appropriate authentication mode for your application as shown below.

Here, we are keeping the default authentication for our application which is No Authentication. Click OK to continue.

Wait for some time till Visual Studio creates a simple MVC project using default template as shown below.

Now, press F5 to run the project in debug mode or Ctrl + F5 to run the project without debugging. It will open home page in the browser as shown below.

 

So in this way, you can create your first MVC 5 application using Visual Studio 2013 for Web.

 

Thank you for visit our website