HOME

Share

What is ASP.Net MVC? Build a Website using MVC?

Are you working with ASP.Net? Then...your companion is here....
Ask anything...you will get a solution...

What is ASP.Net MVC? Build a Website using MVC?

Postby shijokadankavil on Sat Feb 20, 2010 3:50 am

What is a .Net 3.5 MVC website? ASP.Net MVC sample project.
How to create a sample ASP.Net MVC project / MVC Website????

First we need to istall Framework 3.5 with SP1 to create a MVC Project/Website.

What is MVC?,What is ASP.Net MVC Application?

MVC means Model, Views and controllers. what are these???????

Controllers - Resposnsible for controlling the user interactions. It takes the browser requests and the controller contains the logic, how to resposnse to browser requests. Controller may direct to a page or to another controller or to another class.
In short Controllers are the flow control logic in an application.

ASP.Net MVC View - It is all about the view in application, that is a view can be a HTML Page,Scripts for menu or in short in an ASP .net application what we see can call as a VIEW in MVC application. That is the logic behind the view. I think you folow me.

MOdel - All application logics such as businnes logic , validation logics, data access logic, data access class etc.


These are the basic steps to create a MVC Project


    Launch Visual Studio 2008, Select the menu option File, New Project then New Project Dialogue box appear as shown below

    Select the ASP.NET MVC Web Application Template from the dialogue box and click Ok.

    When you create a ASP.NET MVC Application, Create Unit Test Dialogue box appears as shown below.

    Select the Yes, create a unit test project and click Ok.

    After ASP.NET MVC Application is created. You will see several folders in Solution Explorer. You will find three folders named Models, Views and Controllers.

    If you expand the Controllers Folder, you will see a file named HomeController.cs and if you expand the Views folder you will see About.aspx and Index.aspx under Home Sub Folder.

    Now you run the application you will see the output

I think now it is more clear the idea MVC..right...??

The advantage of MVC are

    Provides complete control over your HTML markup

      Enables rich AJAX integration

      Intuitive website URLs

      Clear separation of concerns which results in web applications that are easier to maintain and extend over time.

      Testability – including support for test-driven development.

:)
Happy programming
Shijo JOseph
User avatar
shijokadankavil
Site Admin
 
Posts: 106
Joined: Sat Jun 14, 2008 7:23 pm

Re: What is ASP.Net MVC? Build a Website using MVC?

Postby David on Sat Feb 20, 2010 4:17 am

Nice article, too simple and understandable.

Can u explain about AJAX enabled webservice??

Thanxs
David
 
Posts: 114
Joined: Mon Jul 14, 2008 12:07 pm


Return to ASP.Net

Who is online

Users browsing this forum: No registered users and 1 guest

cron