Action methods typically return a result that is known as an action result. The ActionResult class is the base class for all action results. You decide which type of action result to return based on the task that the action method is performing.

A common action result is obtained by calling the View method, which returns an instance of the ViewResult class. The ViewResult derives from ActionResult. In that case, the return type of the action method is ActionResult, but an instance of the ViewResult class is returned, as shown below.

It is helpful to set the return type to ActionResult because in more complicated action methods, you may need to return different types of results for different scenarios. For example, the registration action method from the default MVC template, redirects the users if registration is successful, but displays the error messages if registration fails.

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.