19 January 2014

ActionResult in MVC 4

ActionResult in MVC 4

The ActionResult class is the base class for action results.

An action method responds to user input by performing work and returning an action result. An action result represents a command that the framework will perform on behalf of the action method.

The following types derive from ActionResult:

ContentResult - Represents a user-defined content type that is the result of an action method.

EmptyResult - Represents a result that does nothing, such as a controller action method that returns nothing.

FileResult - Represents a base class that is used to send binary file content to the response.

HttpUnauthorizedResult - Represents the result of an unauthorized HTTP request.

JavaScriptResult - Sends JavaScript content to the response.

JsonResult - Represents a class that is used to send JSON-formatted content to the response.

RedirectResult - Controls the processing of application actions by redirecting to a specified URI.

RedirectToRouteResult - Represents a result that performs a redirection by using the specified route values dictionary.

ViewResultBase - The ViewResultBase class is the abstract base class for both the ViewResult and PartialViewResult classes. The class contains methods for finding the view to be rendered and for executing the result. This class also contains properties that identify the view to be rendered, the name of the view, view data, temporary data, and a collection for view engines for the application.


No comments:

Post a Comment

Comments Welcome