ActionResult is located within the SYSTEM.WEB.MVC namespace and is an abstract class that encapsulates the results of an action method and is used to perform frame-level operations on behalf of the action method.
Derived classes include:
? Contentresult: Represents a user-defined content type that is the result of an action method.
? Emptyresult: Represents a result of not performing any action, such as a controller action method that does not return any content.
? Fileresult: This is an abstract class that represents a base class for sending binary file contents to a response, again deriving Filecontentresult, Filepathresult, and Filestreamresult, The three specific derived classes correspond to the content, path, and binary stream, and do not have to be overly tangled, depending on the type of file you want to output.
? Httpstatuscoderesult: Provides a way to return the result of an operation with a specific HTTP response status code and description, derived again from the Httpunauthorizedresult and Httpnotfoundresult two, However, if you are familiar with the HTTP status code, these two sub-classes should not be used ...
? Javascriptresult: Sends JavaScript content to the response.
? Jsonresult: Represents a class that is used to send JSON-formatted content to a response.
? Redirectresult: Controls the processing of application operations by redirecting to the specified URI.
? Redirecttorouteresult: Represents the result of using the specified route value dictionary to perform the redirection.
? Viewresultbase: This is also an abstract class that represents a base class that provides a model for a view and renders a view to the response. It has two derived classes Partialviewresult and Viewresult, and they both execute the Executeresult method of the parent class and write the Findview method again. The difference is that Partialviewresult is for the user control. Ascx,viewresult for ASPX, cshtml, or custom views.
Here are nine derived classes that basically cover all of the operational results you might use, depending on what you need to do with your business ^_^
The ActionResult of MVC