Controller Members

Provides methods that respond to HTTP requests to an ASP.NET MVC Web site.

The Controller type exposes the following members.

  NameDescription
Protected method Controller Initializes a new instance of the Controller class.
Top

  NameDescription
Protected method Content Overloaded. Creates a content result.
Public method CreateObjRef Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (Inherited from MarshalByRefObject.)
Public method Dispose Overloaded. Releases all resources that are used by the current instance of the Controller class.
Public method Equals Determines whether the specified Object is equal to the current Object. (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 Overloaded. Creates a FileContentResult object.
Protected method Finalize Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
Public method GetHashCode Serves as a hash function for a particular type. (Inherited from Object.)
Public method GetLifetimeService Retrieves the current lifetime service object that controls the lifetime policy for this instance. (Inherited from MarshalByRefObject.)
Public method GetType Gets the Type of the current instance. (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 Initialize Initializes data that might not be available when the constructor is called. (Overrides ControllerBase.Initialize(RequestContext).)
Public method InitializeLifetimeService Obtains a lifetime service object to control the lifetime policy for this instance. (Inherited from MarshalByRefObject.)
Protected method JavaScript Creates a JavaScriptResult object.
Protected method Json Overloaded. Creates a JSonResult object that serializes the specified object to JavaScript Object Notation (JSON).
Protected method MemberwiseClone Overloaded.
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 Overloaded. Creates a PartialViewResult object that renders a partial view.
Protected method Redirect Creates a RedirectResult object that redirects to the specified URL.
Protected method RedirectToAction Overloaded. Returns an HTTP 302 response to the browser, which causes the browser to make a GET request to the specified action.
Protected method RedirectToRoute Overloaded. Redirects to a URL that is determined by the routing API.
Public method ToString Returns a String that represents the current Object. (Inherited from Object.)
Protected method TryUpdateModel<TModel> Overloaded.
Protected method UpdateModel<TModel> Overloaded.
Protected method View Overloaded. Creates a ViewResult object that renders a view to the response.
Top

  NameDescription
Public property ActionInvoker Gets the action invoker for the controller.
Protected property Binders Gets or sets the binder.
Public property ControllerContext Gets or sets the controller context. (Inherited from ControllerBase.)
Public property HttpContext Gets HTTP-specific information about an individual HTTP request.
Public property ModelState Gets the model state dictionary object that contains the state of the model and of model-binding validation.
Public property Request Gets the HttpRequestBase object for the current HTTP request.
Public property Response Gets the HttpResponseBase object for the current HTTP response.
Public property RouteData Gets the route data for the current request.
Public property Server Gets the HttpServerUtilityBase object that provides methods that are used during Web request processing.
Public property Session Gets the HttpSessionStateBase object for the current HTTP request.
Public property TempData Gets or sets the dictionary for temporary data. (Inherited from ControllerBase.)
Public property TempDataProvider Gets the temporary data provider object that is used to store data for the next request.
Public property Url Gets the URL helper object that is used to generate URLs by using routing.
Public property User Gets the user security information for the current HTTP request.
Public property ValidateRequest Gets or sets a value that indicates whether the request is valid. (Inherited from ControllerBase.)
Public property ValueProvider Gets or sets the value provider for the controller. (Inherited from ControllerBase.)
Public property ViewData Gets or sets the dictionary for view data. (Inherited from ControllerBase.)
Top

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

Community Additions

Show: