Learn your way! Get started

MVC 4.0, Part 02 of 11: Controllers

with expert Phil Ledgerwood

Watch trailer

Course at a glance

Included in these subscriptions:

  • Dev & IT Pro Video
  • Dev & IT Pro Power Pack

Release date 3/18/2013
Level Intermediate
Runtime 1h 16m
Closed captioning Included
Transcript Included
eBooks / courseware Included
Hands-on labs Included
Sample code Included
Exams Included

Enterprise Solutions

Need reporting, custom learning tracks, or SCORM? Learn More

Course description

The engine that drives powerful web applications is the Controller. This one object is responsible for creating the page that goes to the user and supplying it with all the data it needs. This course will show you how to create a controller and how they work. Then you will learn about Actions of the controller then the how Action Inputs do their job. To close this course you will see Action Results and how it can be used to interface with the end user.


This course assumes that you are familiar and experienced with Microsoft’s .NET Framework and ASP.NET development tools. You should be familiar with Web development and understand how HTTP and HTML work to produce Web pages for the user. You should have strong experience with .NET Framework 4.0 or later programming. You should have experience with Visual Studio 2012. Experience with building database applications using these tools will be helpful, although not strictly necessary.

Learning Paths

This course will help you prepare for the following certifications and exams:
MCSD: SharePoint Applications
MCSD: Web Applications
70-486: Developing ASP.NET MVC Web Applications

This course is part of the following LearnNowOnline SuccessPaths™:
Building MVC Web Applications

Meet the expert

Philip Ledgerwood has been a software developer for fifteen years. He currently works primarily in .NET technologies producing custom software for organizations of all sizes. He has also done extensive training for those same organizations in both technical and business process topics. Philip is a strong advocate of Lean and agile software development and spends most of his time helping companies interested in the value those practices can bring to their development efforts. He does this through a combination of training and working "in the trenches" as a developer on these teams, keeping a hand in the academic side of emerging technology and practices while also directly applying it in real projects to bring real business value.

Course outline


What is the Controller (16:08)
  • Introduction (00:18)
  • What is the Controller (00:43)
  • Using Controllers (01:11)
  • The IController Interface (00:32)
  • Demo: IController Interface (04:42)
  • The ControllerBase Class (00:57)
  • The Controller Class (00:49)
  • Demo: Controller Class (04:37)
  • Request Processing Pipeline (01:56)
  • Summary (00:18)
Actions (20:45)
  • Introduction (00:18)
  • Choosing the Right Actions (01:21)
  • ActionName Attribute (02:15)
  • Demo: ActionName Attribute (03:27)
  • Demo: Implementing ActionName (02:08)
  • ActionMethodSelector Attribute (01:10)
  • Demo: ActionMethodSelector (04:19)
  • The Final Selection (01:34)
  • Demo: HandleUnknownAction (03:57)
  • Summary (00:12)
Action Inputs (21:35)
  • Introduction (00:20)
  • Action Method Inputs (00:51)
  • Context Object Input (02:00)
  • Demo: Context Object Inputs (04:18)
  • Parameters (01:14)
  • Demo: Parameters (04:20)
  • Model Bindings (01:30)
  • Demo: Model Bindings (02:31)
  • Demo: Editing Model Data (04:14)
  • Summary (00:12)
Action Results (17:35)
  • Introduction (00:18)
  • Results (01:03)
  • ViewResult (01:45)
  • Demo: ViewResults (04:15)
  • ContentResult (00:30)
  • Demo: ContentResult (03:28)
  • Implicit Action Results (01:15)
  • HttpNotFoundResult (00:55)
  • HttpStatusCodeResult (01:24)
  • Demo: HttpStatusCodeResult (02:22)
  • Summary (00:16)