Controllers and Actions

Every request that comes to your application is handled by a controller. The controller is free to handle the request any way it sees fit, as long as it doesn’t stray into the areas of responsibility that belong to the model and view. This means that we do not put business or data storage logic into a controller, nor do we generate user interfaces.

In the ASP.NET MVC Framework, controllers are .NET classes that contain the logic required to handle a request. In Chapter 3, we explained that the role of the controller is to encapsulate your application logic. This means that controllers are responsible for processing ...

Get Pro ASP.NET MVC 4, Fourth Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.