What are all the methods that return an ActionResult in ASP.NET MVC as of right now (ie. RedirectToAction, etc.)
I haven't found a good documentation resource that lists this kind of stuff.
There are two methods in Action Result. One is ActionResult() and another one is ExecuteResult().
The ASP.NET MVC framework supports four different types of filters: Authorization filters – Implements the IAuthorizationFilter attribute. Action filters – Implements the IActionFilter attribute. Result filters – Implements the IResultFilter attribute.
As you can see, there are three categories of data types of ActionResult, Content Returning Results. Redirection Results.
Found from here
System.Web.Mvc.ActionResult System.Web.Mvc.ContentResult System.Web.Mvc.EmptyResult System.Web.Mvc.FileResult System.Web.Mvc.HttpUnauthorizedResult System.Web.Mvc.JavaScriptResult System.Web.Mvc.JsonResult System.Web.Mvc.RedirectResult System.Web.Mvc.RedirectToRouteResult System.Web.Mvc.ViewResultBase
Methods on the controller object are here
There is:
Content File Javascript Json PartialView Redirect RedirectToAction RedirectToRoute View
From ActionResult types in MVC2:
ContentResult – Represents a text result.
EmptyResult – Represents no result.
FileContentResult – Represents a downloadable file (with the binary content).
FilePathResult – Represents a downloadable file (with a path).
FileStreamResult – Represents a downloadable file (with a file stream).
JavaScriptResult – Represents a JavaScript script.
JsonResult – Represents a JavaScript Object Notation result that can be used in an AJAX application.
PartialViewResult – Represents HTML and markup rendered by a partial view.
RedirectResult – Represents a redirection to a new URL.
RedirectToRouteResult – Represents a result that performs a redirection by using the specified route values dictionary.
ViewResult – Represents HTML and markup rendered by a view.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With