O'Reilly logo

Pro ASP.NET MVC 2 Framework by Steven Sanderson

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 9. Controllers and Actions

Each time a request comes in to your ASP.NET MVC application, it's dealt with by a controller. The controller is the boss: it can do anything it likes to service that request. It can issue any set of commands to the underlying model tier or database, and it can choose to render any view back to the visitor. It's a .NET class into which you can add any logic needed to handle the request.

In this chapter, you'll get familiar with all the most frequently used capabilities of controllers. We'll start with a quick discussion of the relevant architectural principles, and then look at your options for receiving input and producing output, and how it all fits neatly with unit testing. This knowledge will prepare you for ...

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