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.
.
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.
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.
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:
- How to print a custom string Message in asp.net MVC project.
- How to add a controller in MVC project.
- How to add a view in MVC project.
Comments
Post a Comment