Create Demo Asp.net with C# MVC Application

Create Demo Asp.net with C# MVC Application:



In this post we create a first Demo application of asp.net MVC (model view controller). As we know that the MVC is a framework of asp.net in my past post we learn some important theoretical knowledge of MVC model for this we give some topic in this asp.net blog these are:








ASP.NET MVC Application:

Now we stat how to create a MVC web application in asp.net or we can say how to start work in asp.net MVC framework.

ASP.NET MVC or the MVC ASP.NET Site:

For creating a demo in MVC of Asp.net we describe some steps:

Step 1:
  • First of all open the IED (integrated development Environment) .
  • Go to file menu ---> Project ---> choose Asp.net net MVC web Application As like in given Image.


Create Demo Asp.net with C# MVC Application by parijat
Create Demo Asp.net with C# MVC Application by parijat
.

Step 2:
  • After creating web application we see some folders in Solution Explorer (MVC project hierarchy) these are –

         Controllers, Models and view. These three is a major folder of asp.net MVC project.

Here we can also see some files which are created by default in different -2 folders.
  • Controllers -: this has AccountController.cs   and HomeController.cs. The controller is nothing only a class file (.cs) with Action Methods.
  • Models: this has AccountModels.cs file.
  • View: view has some sub folder with files as describe in Image.Create Demo Asp.net with C# MVC Application by parijat




As we see in this, here we have one by default created control is “HomeController “with some message. So we debug this application and see the result.

Create Demo Asp.net with C# MVC Application by parijat


If you can change the url by
Or
Or

You get the same result. 
In MVC application first executes the controller file and then view. The view use for represent or display the data in web browser so we can say that view is a web page where we display the data for user.



Other MVC related post:

In the Next post we consider fallowing in asp.net MVC:

Sql Server Qus:

Comments