Controller Methods

Include Protected Members
Include Inherited Members

The Controller type exposes the following members.

Methods

  Name Description
Protected method Content(String) Creates a content result object by using a string.
Protected method Content(String, String) Creates a content result object by using a string and the content type.
Protected method Content(String, String, Encoding) Creates a content result object by using a string, the content type, and content encoding.
Protected method CreateActionInvoker Creates an action invoker.
Protected method CreateTempDataProvider Creates a temporary data provider.
Public method Dispose() Releases all resources that are used by the current instance of the Controller class.
Protected method Dispose(Boolean) Releases unmanaged resources and optionally releases managed resources.
Public method Equals (Inherited from Object.)
Protected method Execute Executes the specified request context. (Inherited from ControllerBase.)
Protected method ExecuteCore Invokes the action in the current controller context. (Overrides ControllerBase.ExecuteCore().)
Protected method File(Byte[], String) Creates a FileContentResult object by using the file contents and file type.
Protected method File(Stream, String) Creates a FileStreamResult object by using the Stream object and content type.
Protected method File(String, String) Creates a FilePathResult object by using the file name and the content type.
Protected method File(Byte[], String, String) Creates a FileContentResult object by using the file contents, content type, and the destination file name.
Protected method File(Stream, String, String) Creates a FileStreamResult object using the Stream object, the content type, and the target file name.
Protected method File(String, String, String) Creates a FilePathResult object by using the file name, the content type, and the file download name.
Protected method Finalize (Inherited from Object.)
Public method GetHashCode (Inherited from Object.)
Public method GetType (Inherited from Object.)
Protected method HandleUnknownAction Called when a request matches this controller, but no method with the specified action name is found in the controller.
Protected method HttpNotFound() Returns an instance of the HttpNotFoundResult class.
Protected method HttpNotFound(String) Returns an instance of the HttpNotFoundResult class.
Protected method Initialize Initializes data that might not be available when the constructor is called. (Overrides ControllerBase.Initialize(RequestContext).)
Protected method JavaScript Creates a JavaScriptResult object.
Protected method Json(Object) Creates a JsonResult object that serializes the specified object to JavaScript Object Notation (JSON).
Protected method Json(Object, String) Creates a JsonResult object that serializes the specified object to JavaScript Object Notation (JSON) format.
Protected method Json(Object, JsonRequestBehavior) Creates a JsonResult object that serializes the specified object to JavaScript Object Notation (JSON) format using the specified JSON request behavior.
Protected method Json(Object, String, Encoding) Creates a JsonResult object that serializes the specified object to JavaScript Object Notation (JSON) format.
Protected method Json(Object, String, JsonRequestBehavior) Creates a JsonResult object that serializes the specified object to JavaScript Object Notation (JSON) format using the specified content type and JSON request behavior.
Protected method Json(Object, String, Encoding, JsonRequestBehavior) Creates a JsonResult object that serializes the specified object to JavaScript Object Notation (JSON) format using the content type, content encoding, and the JSON request behavior.
Protected method MemberwiseClone (Inherited from Object.)
Protected method OnActionExecuted Called after the action method is invoked.
Protected method OnActionExecuting Called before the action method is invoked.
Protected method OnAuthorization Called when authorization occurs.
Protected method OnException Called when an unhandled exception occurs in the action.
Protected method OnResultExecuted Called after the action result that is returned by an action method is executed.
Protected method OnResultExecuting Called before the action result that is returned by an action method is executed.
Protected method PartialView() Creates a PartialViewResult object that renders a partial view.
Protected method PartialView(Object) Creates a PartialViewResult object that renders a partial view, by using the specified model.
Protected method PartialView(String) Creates a PartialViewResult object that renders a partial view, by using the specified view name.
Protected method PartialView(String, Object) Creates a PartialViewResult object that renders a partial view, by using the specified view name and model.
Protected method Redirect Creates a RedirectResult object that redirects to the specified URL.
Protected method RedirectPermanent Returns an instance of the RedirectResult class with the Permanent property set to true.
Protected method RedirectToAction(String) Redirects to the specified action using the action name.
Protected method RedirectToAction(String, Object) Redirects to the specified action using the action name and route values.
Protected method RedirectToAction(String, String) Redirects to the specified action using the action name and controller name.
Protected method RedirectToAction(String, RouteValueDictionary) Redirects to the specified action using the action name and route dictionary.
Protected method RedirectToAction(String, String, Object) Redirects to the specified action using the action name, controller name, and route values.
Protected method RedirectToAction(String, String, RouteValueDictionary) Redirects to the specified action using the action name, controller name, and route dictionary.
Protected method RedirectToActionPermanent(String) Returns an instance of the RedirectResult class with the Permanent property set to true using the specified action name.
Protected method RedirectToActionPermanent(String, Object) Returns an instance of the RedirectResult class with the Permanent property set to true using the specified action name, and route values.
Protected method RedirectToActionPermanent(String, String) Returns an instance of the RedirectResult class with the Permanent property set to true using the specified action name, and controller name.
Protected method RedirectToActionPermanent(String, RouteValueDictionary) Returns an instance of the RedirectResult class with the Permanent property set to true using the specified action name, and route values.
Protected method RedirectToActionPermanent(String, String, Object) Returns an instance of the RedirectResult class with the Permanent property set to true using the specified action name, controller name, and route values.
Protected method RedirectToActionPermanent(String, String, RouteValueDictionary) Returns an instance of the RedirectResult class with the Permanent property set to true using the specified action name, controller name, and route values.
Protected method RedirectToRoute(Object) Redirects to the specified route using the specified route values.
Protected method RedirectToRoute(String) Redirects to the specified route using the route name.
Protected method RedirectToRoute(RouteValueDictionary) Redirects to the specified route using the route dictionary.
Protected method RedirectToRoute(String, Object) Redirects to the specified route using the route name and route values.
Protected method RedirectToRoute(String, RouteValueDictionary) Redirects to the specified route using the route name and route dictionary.
Protected method RedirectToRoutePermanent(Object) Returns an instance of the RedirectResult class with the Permanent property set to true using the specified route values.
Protected method RedirectToRoutePermanent(String) Returns an instance of the RedirectResult class with the Permanent property set to true using the specified route name.
Protected method RedirectToRoutePermanent(RouteValueDictionary) Returns an instance of the RedirectResult class with the Permanent property set to true using the specified route values.
Protected method RedirectToRoutePermanent(String, Object) Returns an instance of the RedirectResult class with the Permanent property set to true using the specified route name and route values.
Protected method RedirectToRoutePermanent(String, RouteValueDictionary) Returns an instance of the RedirectResult class with the Permanent property set to true using the specified route name and route values.
Public method ToString (Inherited from Object.)
Protected method TryUpdateModel<TModel>(TModel) Updates the specified model instance using values from the controller's current value provider.
Protected method TryUpdateModel<TModel>(TModel, String) Updates the specified model instance using values from the controller's current value provider and a prefix.
Protected method TryUpdateModel<TModel>(TModel, String[]) Updates the specified model instance using values from the controller's current value provider and included properties.
Protected method TryUpdateModel<TModel>(TModel, IValueProvider) Updates the specified model instance using values from the value provider.
Protected method TryUpdateModel<TModel>(TModel, String, String[]) Updates the specified model instance using values from the controller's current value provider, a prefix, and included properties.
Protected method TryUpdateModel<TModel>(TModel, String, IValueProvider) Updates the specified model instance using values from the value provider and a prefix.
Protected method TryUpdateModel<TModel>(TModel, String[], IValueProvider) Updates the specified model instance using values from the value provider and a list of properties to include.
Protected method TryUpdateModel<TModel>(TModel, String, String[], String[]) Updates the specified model instance using values from the controller's current value provider, a prefix, a list of properties to exclude, and a list of properties to include.
Protected method TryUpdateModel<TModel>(TModel, String, String[], IValueProvider) Updates the specified model instance using values from the value provider, a prefix, and included properties.
Protected method TryUpdateModel<TModel>(TModel, String, String[], String[], IValueProvider) Updates the specified model instance using values from the value provider, a prefix, a list of properties to exclude , and a list of properties to include.
Protected method TryValidateModel(Object) Validates the specified model instance.
Protected method TryValidateModel(Object, String) Validates the specified model instance using an HTML prefix.
Protected method UpdateModel<TModel>(TModel) Updates the specified model instance using values from the controller's current value provider.
Protected method UpdateModel<TModel>(TModel, String) Updates the specified model instance using values from the controller's current value provider and a prefix.
Protected method UpdateModel<TModel>(TModel, String[]) Updates the specified model instance using values from the controller object's current value provider.
Protected method UpdateModel<TModel>(TModel, IValueProvider) Updates the specified model instance using values from the value provider.
Protected method UpdateModel<TModel>(TModel, String, String[]) Updates the specified model instance using values from the controller's current value provider, a prefix, and included properties.
Protected method UpdateModel<TModel>(TModel, String, IValueProvider) Updates the specified model instance using values from the value provider and a prefix.
Protected method UpdateModel<TModel>(TModel, String[], IValueProvider) Updates the specified model instance using values from the value provider, a prefix, and a list of properties to include.
Protected method UpdateModel<TModel>(TModel, String, String[], String[]) Updates the specified model instance using values from the controller's current value provider, a prefix, a list of properties to exclude, and a list of properties to include.
Protected method UpdateModel<TModel>(TModel, String, String[], IValueProvider) Updates the specified model instance using values from the value provider, a prefix, and a list of properties to include.
Protected method UpdateModel<TModel>(TModel, String, String[], String[], IValueProvider) Updates the specified model instance using values from the value provider, a prefix, a list of properties to exclude, and a list of properties to include.
Protected method ValidateModel(Object) Validates the specified model instance.
Protected method ValidateModel(Object, String) Validates the specified model instance using an HTML prefix.
Protected method View() Creates a ViewResult object that renders a view to the response.
Protected method View(Object) Creates a ViewResult object by using the model that renders a view to the response.
Protected method View(String) Creates a ViewResult object by using the view name that renders a view.
Protected method View(IView) Creates a ViewResult object that renders the specified IView object.
Protected method View(String, Object) Creates a ViewResult object by using the view name and model that renders a view to the response.
Protected method View(String, String) Creates a ViewResult object using the view name and master-page name that renders a view to the response.
Protected method View(IView, Object) Creates a ViewResult object that renders the specified IView object.
Protected method View(String, String, Object) Creates a ViewResult object using the view name, master-page name, and model that renders a view.

Top

Explicit Interface Implementations

  Name Description
Explicit interface implemetationPrivate method IActionFilter.OnActionExecuted This API supports the ASP.NET MVC infrastructure and is not intended to be used directly from your code. This method calls the OnActionExecuted method.
Explicit interface implemetationPrivate method IActionFilter.OnActionExecuting This API supports the ASP.NET MVC infrastructure and is not intended to be used directly from your code. This method calls the OnActionExecuting method.
Explicit interface implemetationPrivate method IAuthorizationFilter.OnAuthorization This API supports the ASP.NET MVC infrastructure and is not intended to be used directly from your code. This method calls the OnAuthorization method.
Explicit interface implemetationPrivate method IController.Execute Executes the specified request context. (Inherited from ControllerBase.)
Explicit interface implemetationPrivate method IExceptionFilter.OnException This API supports the ASP.NET MVC infrastructure and is not intended to be used directly from your code. This method calls the OnException method.
Explicit interface implemetationPrivate method IResultFilter.OnResultExecuted This API supports the ASP.NET MVC infrastructure and is not intended to be used directly from your code. This method calls the OnResultExecuted method.
Explicit interface implemetationPrivate method IResultFilter.OnResultExecuting This API supports the ASP.NET MVC infrastructure and is not intended to be used directly from your code. This method calls the OnResultExecuting method.

Top

See Also

Reference

Controller Class

System.Web.Mvc Namespace