An action method is used to return an instance of any class which is derived from ActionResult class. Some of the return types of a controller action method are:
- ViewResult : It is used to return a webpage from an action method
- PartialViewResult : It is used to send a section of a view to be rendered inside another view.
- RedirectResult : Based on a URL, It is used to redirect to another controller and action method.
- ContentResult : It is an HTTP content type may be of text/plain. It is used to return a custom content type as a result of the action method.
- JsonResult : It is used to return a message which is formatted as JSON.
- FileResult : It is used to send binary output as the response.
- EmptyResult : It returns nothing as the result.