MVC

Post date: Jul 21, 2011 8:10:00 AM

MVC controller:

In asp.net MVC Application we have a class called controller. Controller class is responsible for interaction between user and application. It handle the user request and forward that request to corresponding pages.

Action Result:

Most action methods return an instance of a class that derives from ActionResult. The ActionResult class is the base for all action results. However, there are different action result types, depending on the task that the action method is performing. For example, the most common action is to call the View method. The View method returns an instance of the ViewResult class, which is derived from ActionResult.

You can create action methods that return an object of any type, such as a string, an integer, or a Boolean value. These return types are wrapped in an appropriate ActionResult type before they are rendered to the response stream.

The following table shows the built-in action result types and the action helper methods that return them.