O'Reilly logo

ASP.NET MVC in Action with MvcContrib, NHibernate, and More by Jimmy Bogard, Jeffrey Palermo, Ben Scheirman

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

Chapter 3. The controller in depth

This chapter covers

  • Understanding controller anatomy

  • Leveraging viewless controllers

  • Testing controllers

  • Using form and querystring values

  • Binding action parameter

  • Developing action filters

The focus of the Model-View-Controller pattern is the controller. With this pattern, every request is handled by a controller and rendered by a view. Without the controller, presentation and business logic would move to the view, as we have seen with Web Forms. With the ASP.NET MVC Framework, every request routes to a controller, which is simply a class that implements the IController interface. Microsoft provides the base class System.Web.Mvc.Controller to make creating a controller easy. The controller base class you choose is ...

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