O'Reilly logo

ASP.NET MVC 1.0 Quickly by Maarten Balliauw

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The controller in depth

In an MVC application, the controller is the portion of the application that is responsible for communicating the data from the model to a view. Typically, the controller does not contain any business logic, but instead contains the logic required to communicate with the business layer and the view.

Creating a controller

Creating a controller in Visual Studio 2008 can be done by adding a new item to the project, selecting the MVC Controller Class template, which is located under the Web | MVC category. Another option is to select the Add controller... option when right‑clicking on the solution. This menu item shows a form that can be used to specify some details for the controller class to be created:

In this window, you ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required