Controller Controller Controller Class

Definition

A base class for an MVC controller with view support.

public abstract class Controller : Microsoft.AspNetCore.Mvc.ControllerBase, IDisposable, Microsoft.AspNetCore.Mvc.Filters.IActionFilter, Microsoft.AspNetCore.Mvc.Filters.IAsyncActionFilter
type Controller = class
    inherit ControllerBase
    interface IActionFilter
    interface IFilterMetadata
    interface IAsyncActionFilter
    interface IDisposable
Public MustInherit Class Controller
Inherits ControllerBase
Implements IActionFilter, IAsyncActionFilter, IDisposable
Inheritance
Implements

Constructors

Controller() Controller() Controller()

Properties

ControllerContext ControllerContext ControllerContext

Gets or sets the ControllerContext.

(Inherited from ControllerBase)
HttpContext HttpContext HttpContext

Gets the HttpContext for the executing action.

(Inherited from ControllerBase)
MetadataProvider MetadataProvider MetadataProvider

Gets or sets the IModelMetadataProvider.

(Inherited from ControllerBase)
ModelBinderFactory ModelBinderFactory ModelBinderFactory

Gets or sets the IModelBinderFactory.

(Inherited from ControllerBase)
ModelState ModelState ModelState

Gets the ModelStateDictionary that contains the state of the model and of model-binding validation.

(Inherited from ControllerBase)
ObjectValidator ObjectValidator ObjectValidator

Gets or sets the IObjectModelValidator.

(Inherited from ControllerBase)
Request Request Request

Gets the HttpRequest for the executing action.

(Inherited from ControllerBase)
Response Response Response

Gets the HttpResponse for the executing action.

(Inherited from ControllerBase)
RouteData RouteData RouteData

Gets the RouteData for the executing action.

(Inherited from ControllerBase)
TempData TempData TempData

Gets or sets ITempDataDictionary used by ViewResult.

Url Url Url

Gets or sets the IUrlHelper.

(Inherited from ControllerBase)
User User User

Gets the ClaimsPrincipal for user associated with the executing action.

(Inherited from ControllerBase)
ViewBag ViewBag ViewBag

Gets the dynamic view bag.

ViewData ViewData ViewData

Gets or sets ViewDataDictionary used by ViewResult and ViewBag.

Methods

Accepted() Accepted() Accepted()

Creates a AcceptedResult object that produces an Status202Accepted response.

(Inherited from ControllerBase)
Accepted(Object) Accepted(Object) Accepted(Object)

Creates a AcceptedResult object that produces an Status202Accepted response.

(Inherited from ControllerBase)
Accepted(String) Accepted(String) Accepted(String)

Creates a AcceptedResult object that produces an Status202Accepted response.

(Inherited from ControllerBase)
Accepted(String, Object) Accepted(String, Object) Accepted(String, Object)

Creates a AcceptedResult object that produces an Status202Accepted response.

(Inherited from ControllerBase)
Accepted(Uri) Accepted(Uri) Accepted(Uri)

Creates a AcceptedResult object that produces an Status202Accepted response.

(Inherited from ControllerBase)
Accepted(Uri, Object) Accepted(Uri, Object) Accepted(Uri, Object)

Creates a AcceptedResult object that produces an Status202Accepted response.

(Inherited from ControllerBase)
AcceptedAtAction(String) AcceptedAtAction(String) AcceptedAtAction(String)

Creates a AcceptedAtActionResult object that produces an Status202Accepted response.

(Inherited from ControllerBase)
AcceptedAtAction(String, Object) AcceptedAtAction(String, Object) AcceptedAtAction(String, Object)

Creates a AcceptedAtActionResult object that produces an Status202Accepted response.

(Inherited from ControllerBase)
AcceptedAtAction(String, Object, Object) AcceptedAtAction(String, Object, Object) AcceptedAtAction(String, Object, Object)

Creates a AcceptedAtActionResult object that produces an Status202Accepted response.

(Inherited from ControllerBase)
AcceptedAtAction(String, String) AcceptedAtAction(String, String) AcceptedAtAction(String, String)

Creates a AcceptedAtActionResult object that produces an Status202Accepted response.

(Inherited from ControllerBase)
AcceptedAtAction(String, String, Object) AcceptedAtAction(String, String, Object) AcceptedAtAction(String, String, Object)

Creates a AcceptedAtActionResult object that produces an Status202Accepted response.

(Inherited from ControllerBase)
AcceptedAtAction(String, String, Object, Object) AcceptedAtAction(String, String, Object, Object) AcceptedAtAction(String, String, Object, Object)

Creates a AcceptedAtActionResult object that produces an Status202Accepted response.

(Inherited from ControllerBase)
AcceptedAtRoute(Object) AcceptedAtRoute(Object) AcceptedAtRoute(Object)

Creates a AcceptedAtRouteResult object that produces an Status202Accepted response.

(Inherited from ControllerBase)
AcceptedAtRoute(Object, Object) AcceptedAtRoute(Object, Object) AcceptedAtRoute(Object, Object)

Creates a AcceptedAtRouteResult object that produces an Status202Accepted response.

(Inherited from ControllerBase)
AcceptedAtRoute(String) AcceptedAtRoute(String) AcceptedAtRoute(String)

Creates a AcceptedAtRouteResult object that produces an Status202Accepted response.

(Inherited from ControllerBase)
AcceptedAtRoute(String, Object) AcceptedAtRoute(String, Object) AcceptedAtRoute(String, Object)

Creates a AcceptedAtRouteResult object that produces an Status202Accepted response.

(Inherited from ControllerBase)
AcceptedAtRoute(String, Object, Object) AcceptedAtRoute(String, Object, Object) AcceptedAtRoute(String, Object, Object)

Creates a AcceptedAtRouteResult object that produces an Status202Accepted response.

(Inherited from ControllerBase)
BadRequest() BadRequest() BadRequest()

Creates an BadRequestResult that produces a Status400BadRequest response.

(Inherited from ControllerBase)
BadRequest(ModelStateDictionary) BadRequest(ModelStateDictionary) BadRequest(ModelStateDictionary)

Creates an BadRequestObjectResult that produces a Status400BadRequest response.

(Inherited from ControllerBase)
BadRequest(Object) BadRequest(Object) BadRequest(Object)

Creates an BadRequestObjectResult that produces a Status400BadRequest response.

(Inherited from ControllerBase)
Challenge() Challenge() Challenge()

Creates a ChallengeResult.

(Inherited from ControllerBase)
Challenge(AuthenticationProperties) Challenge(AuthenticationProperties) Challenge(AuthenticationProperties)

Creates a ChallengeResult with the specified properties.

(Inherited from ControllerBase)
Challenge(AuthenticationProperties) Challenge(AuthenticationProperties) Challenge(AuthenticationProperties)

Creates a ChallengeResult with the specified properties.

(Inherited from ControllerBase)
Challenge(AuthenticationProperties, String[]) Challenge(AuthenticationProperties, String[]) Challenge(AuthenticationProperties, String[])

Creates a ChallengeResult with the specified authentication schemes and properties.

(Inherited from ControllerBase)
Challenge(AuthenticationProperties, String[]) Challenge(AuthenticationProperties, String[]) Challenge(AuthenticationProperties, String[])

Creates a ChallengeResult with the specified specified authentication schemes and properties.

(Inherited from ControllerBase)
Challenge(String[]) Challenge(String[]) Challenge(String[])

Creates a ChallengeResult with the specified authentication schemes.

(Inherited from ControllerBase)
Conflict() Conflict() Conflict()

Creates an ConflictResult that produces a Status409Conflict response.

(Inherited from ControllerBase)
Conflict(ModelStateDictionary) Conflict(ModelStateDictionary) Conflict(ModelStateDictionary)

Creates an ConflictObjectResult that produces a Status409Conflict response.

(Inherited from ControllerBase)
Conflict(Object) Conflict(Object) Conflict(Object)

Creates an ConflictObjectResult that produces a Status409Conflict response.

(Inherited from ControllerBase)
Content(String) Content(String) Content(String)

Creates a ContentResult object with Status200OK by specifying a content string.

(Inherited from ControllerBase)
Content(String, MediaTypeHeaderValue) Content(String, MediaTypeHeaderValue) Content(String, MediaTypeHeaderValue)

Creates a ContentResult object with Status200OK by specifying a content string and a contentType.

(Inherited from ControllerBase)
Content(String, String) Content(String, String) Content(String, String)

Creates a ContentResult object with Status200OK by specifying a content string and a content type.

(Inherited from ControllerBase)
Content(String, String, Encoding) Content(String, String, Encoding) Content(String, String, Encoding)

Creates a ContentResult object with Status200OK by specifying a content string, a contentType, and contentEncoding.

(Inherited from ControllerBase)
Created(String, Object) Created(String, Object) Created(String, Object)

Creates a CreatedResult object that produces a Status201Created response.

(Inherited from ControllerBase)
Created(Uri, Object) Created(Uri, Object) Created(Uri, Object)

Creates a CreatedResult object that produces a Status201Created response.

(Inherited from ControllerBase)
CreatedAtAction(String, Object) CreatedAtAction(String, Object) CreatedAtAction(String, Object)

Creates a CreatedAtActionResult object that produces a Status201Created response.

(Inherited from ControllerBase)
CreatedAtAction(String, Object, Object) CreatedAtAction(String, Object, Object) CreatedAtAction(String, Object, Object)

Creates a CreatedAtActionResult object that produces a Status201Created response.

(Inherited from ControllerBase)
CreatedAtAction(String, String, Object, Object) CreatedAtAction(String, String, Object, Object) CreatedAtAction(String, String, Object, Object)

Creates a CreatedAtActionResult object that produces a Status201Created response.

(Inherited from ControllerBase)
CreatedAtRoute(Object, Object) CreatedAtRoute(Object, Object) CreatedAtRoute(Object, Object)

Creates a CreatedAtRouteResult object that produces a Status201Created response.

(Inherited from ControllerBase)
CreatedAtRoute(String, Object) CreatedAtRoute(String, Object) CreatedAtRoute(String, Object)

Creates a CreatedAtRouteResult object that produces a Status201Created response.

(Inherited from ControllerBase)
CreatedAtRoute(String, Object, Object) CreatedAtRoute(String, Object, Object) CreatedAtRoute(String, Object, Object)

Creates a CreatedAtRouteResult object that produces a Status201Created response.

(Inherited from ControllerBase)
Dispose() Dispose() Dispose()
Dispose(Boolean) Dispose(Boolean) Dispose(Boolean)

Releases all resources currently used by this Controller instance.

File(Byte[], String) File(Byte[], String) File(Byte[], String)

Returns a file with the specified fileContents as content (Status200OK), and the specified contentType as the Content-Type. This supports range requests (Status206PartialContent or Status416RangeNotSatisfiable if the range is not satisfiable).

(Inherited from ControllerBase)
File(Byte[], String, Boolean) File(Byte[], String, Boolean) File(Byte[], String, Boolean)

Returns a file with the specified fileContents as content (Status200OK), and the specified contentType as the Content-Type. This supports range requests (Status206PartialContent or Status416RangeNotSatisfiable if the range is not satisfiable).

(Inherited from ControllerBase)
File(Byte[], String, Nullable<DateTimeOffset>, EntityTagHeaderValue) File(Byte[], String, Nullable<DateTimeOffset>, EntityTagHeaderValue) File(Byte[], String, Nullable<DateTimeOffset>, EntityTagHeaderValue)

Returns a file with the specified fileContents as content (Status200OK), and the specified contentType as the Content-Type. This supports range requests (Status206PartialContent or Status416RangeNotSatisfiable if the range is not satisfiable).

(Inherited from ControllerBase)
File(Byte[], String, Nullable<DateTimeOffset>, EntityTagHeaderValue, Boolean) File(Byte[], String, Nullable<DateTimeOffset>, EntityTagHeaderValue, Boolean) File(Byte[], String, Nullable<DateTimeOffset>, EntityTagHeaderValue, Boolean)

Returns a file with the specified fileContents as content (Status200OK), and the specified contentType as the Content-Type. This supports range requests (Status206PartialContent or Status416RangeNotSatisfiable if the range is not satisfiable).

(Inherited from ControllerBase)
File(Byte[], String, String) File(Byte[], String, String) File(Byte[], String, String)

Returns a file with the specified fileContents as content (Status200OK), the specified contentType as the Content-Type and the specified fileDownloadName as the suggested file name. This supports range requests (Status206PartialContent or Status416RangeNotSatisfiable if the range is not satisfiable).

(Inherited from ControllerBase)
File(Byte[], String, String, Boolean) File(Byte[], String, String, Boolean) File(Byte[], String, String, Boolean)

Returns a file with the specified fileContents as content (Status200OK), the specified contentType as the Content-Type and the specified fileDownloadName as the suggested file name. This supports range requests (Status206PartialContent or Status416RangeNotSatisfiable if the range is not satisfiable).

(Inherited from ControllerBase)
File(Byte[], String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue) File(Byte[], String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue) File(Byte[], String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue)

Returns a file with the specified fileContents as content (Status200OK), the specified contentType as the Content-Type, and the specified fileDownloadName as the suggested file name. This supports range requests (Status206PartialContent or Status416RangeNotSatisfiable if the range is not satisfiable).

(Inherited from ControllerBase)
File(Byte[], String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue, Boolean) File(Byte[], String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue, Boolean) File(Byte[], String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue, Boolean)

Returns a file with the specified fileContents as content (Status200OK), the specified contentType as the Content-Type, and the specified fileDownloadName as the suggested file name. This supports range requests (Status206PartialContent or Status416RangeNotSatisfiable if the range is not satisfiable).

(Inherited from ControllerBase)
File(Stream, String) File(Stream, String) File(Stream, String)

Returns a file in the specified fileStream (Status200OK), with the specified contentType as the Content-Type. This supports range requests (Status206PartialContent or Status416RangeNotSatisfiable if the range is not satisfiable).

(Inherited from ControllerBase)
File(Stream, String, Boolean) File(Stream, String, Boolean) File(Stream, String, Boolean)

Returns a file in the specified fileStream (Status200OK), with the specified contentType as the Content-Type. This supports range requests (Status206PartialContent or Status416RangeNotSatisfiable if the range is not satisfiable).

(Inherited from ControllerBase)
File(Stream, String, Nullable<DateTimeOffset>, EntityTagHeaderValue) File(Stream, String, Nullable<DateTimeOffset>, EntityTagHeaderValue) File(Stream, String, Nullable<DateTimeOffset>, EntityTagHeaderValue)

Returns a file in the specified fileStream (Status200OK), and the specified contentType as the Content-Type. This supports range requests (Status206PartialContent or Status416RangeNotSatisfiable if the range is not satisfiable).

(Inherited from ControllerBase)
File(Stream, String, Nullable<DateTimeOffset>, EntityTagHeaderValue, Boolean) File(Stream, String, Nullable<DateTimeOffset>, EntityTagHeaderValue, Boolean) File(Stream, String, Nullable<DateTimeOffset>, EntityTagHeaderValue, Boolean)

Returns a file in the specified fileStream (Status200OK), and the specified contentType as the Content-Type. This supports range requests (Status206PartialContent or Status416RangeNotSatisfiable if the range is not satisfiable).

(Inherited from ControllerBase)
File(Stream, String, String) File(Stream, String, String) File(Stream, String, String)

Returns a file in the specified fileStream (Status200OK) with the specified contentType as the Content-Type and the specified fileDownloadName as the suggested file name. This supports range requests (Status206PartialContent or Status416RangeNotSatisfiable if the range is not satisfiable).

(Inherited from ControllerBase)
File(Stream, String, String, Boolean) File(Stream, String, String, Boolean) File(Stream, String, String, Boolean)

Returns a file in the specified fileStream (Status200OK) with the specified contentType as the Content-Type and the specified fileDownloadName as the suggested file name. This supports range requests (Status206PartialContent or Status416RangeNotSatisfiable if the range is not satisfiable).

(Inherited from ControllerBase)
File(Stream, String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue) File(Stream, String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue) File(Stream, String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue)

Returns a file in the specified fileStream (Status200OK), the specified contentType as the Content-Type, and the specified fileDownloadName as the suggested file name. This supports range requests (Status206PartialContent or Status416RangeNotSatisfiable if the range is not satisfiable).

(Inherited from ControllerBase)
File(Stream, String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue, Boolean) File(Stream, String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue, Boolean) File(Stream, String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue, Boolean)

Returns a file in the specified fileStream (Status200OK), the specified contentType as the Content-Type, and the specified fileDownloadName as the suggested file name. This supports range requests (Status206PartialContent or Status416RangeNotSatisfiable if the range is not satisfiable).

(Inherited from ControllerBase)
File(String, String) File(String, String) File(String, String)

Returns the file specified by virtualPath (Status200OK) with the specified contentType as the Content-Type. This supports range requests (Status206PartialContent or Status416RangeNotSatisfiable if the range is not satisfiable).

(Inherited from ControllerBase)
File(String, String, Boolean) File(String, String, Boolean) File(String, String, Boolean)

Returns the file specified by virtualPath (Status200OK) with the specified contentType as the Content-Type. This supports range requests (Status206PartialContent or Status416RangeNotSatisfiable if the range is not satisfiable).

(Inherited from ControllerBase)
File(String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue) File(String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue) File(String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue)

Returns the file specified by virtualPath (Status200OK), and the specified contentType as the Content-Type. This supports range requests (Status206PartialContent or Status416RangeNotSatisfiable if the range is not satisfiable).

(Inherited from ControllerBase)
File(String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue, Boolean) File(String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue, Boolean) File(String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue, Boolean)

Returns the file specified by virtualPath (Status200OK), and the specified contentType as the Content-Type. This supports range requests (Status206PartialContent or Status416RangeNotSatisfiable if the range is not satisfiable).

(Inherited from ControllerBase)
File(String, String, String) File(String, String, String) File(String, String, String)

Returns the file specified by virtualPath (Status200OK) with the specified contentType as the Content-Type and the specified fileDownloadName as the suggested file name. This supports range requests (Status206PartialContent or Status416RangeNotSatisfiable if the range is not satisfiable).

(Inherited from ControllerBase)
File(String, String, String, Boolean) File(String, String, String, Boolean) File(String, String, String, Boolean)

Returns the file specified by virtualPath (Status200OK) with the specified contentType as the Content-Type and the specified fileDownloadName as the suggested file name. This supports range requests (Status206PartialContent or Status416RangeNotSatisfiable if the range is not satisfiable).

(Inherited from ControllerBase)
File(String, String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue) File(String, String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue) File(String, String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue)

Returns the file specified by virtualPath (Status200OK), the specified contentType as the Content-Type, and the specified fileDownloadName as the suggested file name. This supports range requests (Status206PartialContent or Status416RangeNotSatisfiable if the range is not satisfiable).

(Inherited from ControllerBase)
File(String, String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue, Boolean) File(String, String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue, Boolean) File(String, String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue, Boolean)

Returns the file specified by virtualPath (Status200OK), the specified contentType as the Content-Type, and the specified fileDownloadName as the suggested file name. This supports range requests (Status206PartialContent or Status416RangeNotSatisfiable if the range is not satisfiable).

(Inherited from ControllerBase)
Forbid() Forbid() Forbid()

Creates a ForbidResult (Status403Forbidden by default).

(Inherited from ControllerBase)
Forbid(AuthenticationProperties) Forbid(AuthenticationProperties) Forbid(AuthenticationProperties)

Creates a ForbidResult with the specified properties.

(Inherited from ControllerBase)
Forbid(AuthenticationProperties) Forbid(AuthenticationProperties) Forbid(AuthenticationProperties)

Creates a ForbidResult (Status403Forbidden by default) with the specified properties.

(Inherited from ControllerBase)
Forbid(AuthenticationProperties, String[]) Forbid(AuthenticationProperties, String[]) Forbid(AuthenticationProperties, String[])

Creates a ForbidResult (Status403Forbidden by default) with the specified authentication schemes and properties.

(Inherited from ControllerBase)
Forbid(AuthenticationProperties, String[]) Forbid(AuthenticationProperties, String[]) Forbid(AuthenticationProperties, String[])

Creates a ForbidResult with the specified specified authentication schemes and properties.

(Inherited from ControllerBase)
Forbid(String[]) Forbid(String[]) Forbid(String[])

Creates a ForbidResult (Status403Forbidden by default) with the specified authentication schemes.

(Inherited from ControllerBase)
Json(Object) Json(Object) Json(Object)

Creates a JsonResult object that serializes the specified data object to JSON.

Json(Object, JsonSerializerSettings) Json(Object, JsonSerializerSettings) Json(Object, JsonSerializerSettings)

Creates a JsonResult object that serializes the specified data object to JSON.

LocalRedirect(String) LocalRedirect(String) LocalRedirect(String)

Creates a LocalRedirectResult object that redirects (Status302Found) to the specified local localUrl.

(Inherited from ControllerBase)
LocalRedirectPermanent(String) LocalRedirectPermanent(String) LocalRedirectPermanent(String)

Creates a LocalRedirectResult object with Permanent set to true (Status301MovedPermanently) using the specified localUrl.

(Inherited from ControllerBase)
LocalRedirectPermanentPreserveMethod(String) LocalRedirectPermanentPreserveMethod(String) LocalRedirectPermanentPreserveMethod(String)

Creates a LocalRedirectResult object with Permanent set to true and PreserveMethod set to true (Status308PermanentRedirect) using the specified localUrl.

(Inherited from ControllerBase)
LocalRedirectPreserveMethod(String) LocalRedirectPreserveMethod(String) LocalRedirectPreserveMethod(String)

Creates a LocalRedirectResult object with Permanent set to false and PreserveMethod set to true (Status307TemporaryRedirect) using the specified localUrl.

(Inherited from ControllerBase)
NoContent() NoContent() NoContent()

Creates a NoContentResult object that produces an empty Status204NoContent response.

(Inherited from ControllerBase)
NotFound() NotFound() NotFound()

Creates an NotFoundResult that produces a Status404NotFound response.

(Inherited from ControllerBase)
NotFound(Object) NotFound(Object) NotFound(Object)

Creates an NotFoundObjectResult that produces a Status404NotFound response.

(Inherited from ControllerBase)
Ok() Ok() Ok()

Creates a OkResult object that produces an empty Status200OK response.

(Inherited from ControllerBase)
Ok(Object) Ok(Object) Ok(Object)

Creates an OkObjectResult object that produces an Status200OK response.

(Inherited from ControllerBase)
OnActionExecuted(ActionExecutedContext) OnActionExecuted(ActionExecutedContext) OnActionExecuted(ActionExecutedContext)

Called after the action method is invoked.

OnActionExecuting(ActionExecutingContext) OnActionExecuting(ActionExecutingContext) OnActionExecuting(ActionExecutingContext)

Called before the action method is invoked.

OnActionExecutionAsync(ActionExecutingContext, ActionExecutionDelegate) OnActionExecutionAsync(ActionExecutingContext, ActionExecutionDelegate) OnActionExecutionAsync(ActionExecutingContext, ActionExecutionDelegate)

Called before the action method is invoked.

PartialView() PartialView() PartialView()

Creates a PartialViewResult object that renders a partial view to the response.

PartialView(Object) PartialView(Object) PartialView(Object)

Creates a PartialViewResult object by specifying a model to be rendered by the partial view.

PartialView(String) PartialView(String) PartialView(String)

Creates a PartialViewResult object by specifying a viewName.

PartialView(String, Object) PartialView(String, Object) PartialView(String, Object)

Creates a PartialViewResult object by specifying a viewName and the model to be rendered by the partial view.

PhysicalFile(String, String) PhysicalFile(String, String) PhysicalFile(String, String)

Returns the file specified by physicalPath (Status200OK) with the specified contentType as the Content-Type. This supports range requests (Status206PartialContent or Status416RangeNotSatisfiable if the range is not satisfiable).

(Inherited from ControllerBase)
PhysicalFile(String, String, Boolean) PhysicalFile(String, String, Boolean) PhysicalFile(String, String, Boolean)

Returns the file specified by physicalPath (Status200OK) with the specified contentType as the Content-Type. This supports range requests (Status206PartialContent or Status416RangeNotSatisfiable if the range is not satisfiable).

(Inherited from ControllerBase)
PhysicalFile(String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue) PhysicalFile(String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue) PhysicalFile(String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue)

Returns the file specified by physicalPath (Status200OK), and the specified contentType as the Content-Type. This supports range requests (Status206PartialContent or Status416RangeNotSatisfiable if the range is not satisfiable).

(Inherited from ControllerBase)
PhysicalFile(String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue, Boolean) PhysicalFile(String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue, Boolean) PhysicalFile(String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue, Boolean)

Returns the file specified by physicalPath (Status200OK), and the specified contentType as the Content-Type. This supports range requests (Status206PartialContent or Status416RangeNotSatisfiable if the range is not satisfiable).

(Inherited from ControllerBase)
PhysicalFile(String, String, String) PhysicalFile(String, String, String) PhysicalFile(String, String, String)

Returns the file specified by physicalPath (Status200OK) with the specified contentType as the Content-Type and the specified fileDownloadName as the suggested file name. This supports range requests (Status206PartialContent or Status416RangeNotSatisfiable if the range is not satisfiable).

(Inherited from ControllerBase)
PhysicalFile(String, String, String, Boolean) PhysicalFile(String, String, String, Boolean) PhysicalFile(String, String, String, Boolean)

Returns the file specified by physicalPath (Status200OK) with the specified contentType as the Content-Type and the specified fileDownloadName as the suggested file name. This supports range requests (Status206PartialContent or Status416RangeNotSatisfiable if the range is not satisfiable).

(Inherited from ControllerBase)
PhysicalFile(String, String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue) PhysicalFile(String, String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue) PhysicalFile(String, String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue)

Returns the file specified by physicalPath (Status200OK), the specified contentType as the Content-Type, and the specified fileDownloadName as the suggested file name. This supports range requests (Status206PartialContent or Status416RangeNotSatisfiable if the range is not satisfiable).

(Inherited from ControllerBase)
PhysicalFile(String, String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue, Boolean) PhysicalFile(String, String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue, Boolean) PhysicalFile(String, String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue, Boolean)

Returns the file specified by physicalPath (Status200OK), the specified contentType as the Content-Type, and the specified fileDownloadName as the suggested file name. This supports range requests (Status206PartialContent or Status416RangeNotSatisfiable if the range is not satisfiable).

(Inherited from ControllerBase)
Redirect(String) Redirect(String) Redirect(String)

Creates a RedirectResult object that redirects (Status302Found) to the specified url.

(Inherited from ControllerBase)
RedirectPermanent(String) RedirectPermanent(String) RedirectPermanent(String)

Creates a RedirectResult object with Permanent set to true (Status301MovedPermanently) using the specified url.

(Inherited from ControllerBase)
RedirectPermanentPreserveMethod(String) RedirectPermanentPreserveMethod(String) RedirectPermanentPreserveMethod(String)

Creates a RedirectResult object with Permanent set to true and PreserveMethod set to true (Status308PermanentRedirect) using the specified url.

(Inherited from ControllerBase)
RedirectPreserveMethod(String) RedirectPreserveMethod(String) RedirectPreserveMethod(String)

Creates a RedirectResult object with Permanent set to false and PreserveMethod set to true (Status307TemporaryRedirect) using the specified url.

(Inherited from ControllerBase)
RedirectToAction() RedirectToAction() RedirectToAction()

Redirects (Status302Found) to an action with the same name as current one. The 'controller' and 'action' names are retrieved from the ambient values of the current request.

(Inherited from ControllerBase)
RedirectToAction(String) RedirectToAction(String) RedirectToAction(String)

Redirects (Status302Found) to the specified action using the actionName.

(Inherited from ControllerBase)
RedirectToAction(String, Object) RedirectToAction(String, Object) RedirectToAction(String, Object)

Redirects (Status302Found) to the specified action using the actionName and routeValues.

(Inherited from ControllerBase)
RedirectToAction(String, String) RedirectToAction(String, String) RedirectToAction(String, String)

Redirects (Status302Found) to the specified action using the actionName and the controllerName.

(Inherited from ControllerBase)
RedirectToAction(String, String, Object) RedirectToAction(String, String, Object) RedirectToAction(String, String, Object)

Redirects (Status302Found) to the specified action using the specified actionName, controllerName, and routeValues.

(Inherited from ControllerBase)
RedirectToAction(String, String, Object, String) RedirectToAction(String, String, Object, String) RedirectToAction(String, String, Object, String)

Redirects (Status302Found) to the specified action using the specified actionName, controllerName, routeValues, and fragment.

(Inherited from ControllerBase)
RedirectToAction(String, String, String) RedirectToAction(String, String, String) RedirectToAction(String, String, String)

Redirects (Status302Found) to the specified action using the specified actionName, controllerName, and fragment.

(Inherited from ControllerBase)
RedirectToActionPermanent(String) RedirectToActionPermanent(String) RedirectToActionPermanent(String)

Redirects (Status301MovedPermanently) to the specified action with Permanent set to true using the specified actionName.

(Inherited from ControllerBase)
RedirectToActionPermanent(String, Object) RedirectToActionPermanent(String, Object) RedirectToActionPermanent(String, Object)

Redirects (Status301MovedPermanently) to the specified action with Permanent set to true using the specified actionName and routeValues.

(Inherited from ControllerBase)
RedirectToActionPermanent(String, String) RedirectToActionPermanent(String, String) RedirectToActionPermanent(String, String)

Redirects (Status301MovedPermanently) to the specified action with Permanent set to true using the specified actionName and controllerName.

(Inherited from ControllerBase)
RedirectToActionPermanent(String, String, Object) RedirectToActionPermanent(String, String, Object) RedirectToActionPermanent(String, String, Object)

Redirects (Status301MovedPermanently) to the specified action with Permanent set to true using the specified actionName, controllerName, and routeValues.

(Inherited from ControllerBase)
RedirectToActionPermanent(String, String, Object, String) RedirectToActionPermanent(String, String, Object, String) RedirectToActionPermanent(String, String, Object, String)

Redirects (Status301MovedPermanently) to the specified action with Permanent set to true using the specified actionName, controllerName, routeValues, and fragment.

(Inherited from ControllerBase)
RedirectToActionPermanent(String, String, String) RedirectToActionPermanent(String, String, String) RedirectToActionPermanent(String, String, String)

Redirects (Status301MovedPermanently) to the specified action with Permanent set to true using the specified actionName, controllerName, and fragment.

(Inherited from ControllerBase)
RedirectToActionPermanentPreserveMethod(String, String, Object, String) RedirectToActionPermanentPreserveMethod(String, String, Object, String) RedirectToActionPermanentPreserveMethod(String, String, Object, String)

Redirects (Status308PermanentRedirect) to the specified action with Permanent set to true and PreserveMethod set to true, using the specified actionName, controllerName, routeValues, and fragment.

(Inherited from ControllerBase)
RedirectToActionPreserveMethod(String, String, Object, String) RedirectToActionPreserveMethod(String, String, Object, String) RedirectToActionPreserveMethod(String, String, Object, String)

Redirects (Status307TemporaryRedirect) to the specified action with Permanent set to false and PreserveMethod set to true, using the specified actionName, controllerName, routeValues, and fragment.

(Inherited from ControllerBase)
RedirectToPage(String) RedirectToPage(String) RedirectToPage(String)

Redirects (Status302Found) to the specified pageName.

(Inherited from ControllerBase)
RedirectToPage(String, Object) RedirectToPage(String, Object) RedirectToPage(String, Object)

Redirects (Status302Found) to the specified pageName using the specified routeValues.

(Inherited from ControllerBase)
RedirectToPage(String, String) RedirectToPage(String, String) RedirectToPage(String, String)

Redirects (Status302Found) to the specified pageName using the specified pageHandler.

(Inherited from ControllerBase)
RedirectToPage(String, String, Object) RedirectToPage(String, String, Object) RedirectToPage(String, String, Object)

Redirects (Status302Found) to the specified pageName.

(Inherited from ControllerBase)
RedirectToPage(String, String, Object, String) RedirectToPage(String, String, Object, String) RedirectToPage(String, String, Object, String)

Redirects (Status302Found) to the specified pageName using the specified routeValues and fragment.

(Inherited from ControllerBase)
RedirectToPage(String, String, String) RedirectToPage(String, String, String) RedirectToPage(String, String, String)

Redirects (Status302Found) to the specified pageName using the specified fragment.

(Inherited from ControllerBase)
RedirectToPagePermanent(String) RedirectToPagePermanent(String) RedirectToPagePermanent(String)

Redirects (Status301MovedPermanently) to the specified pageName.

(Inherited from ControllerBase)
RedirectToPagePermanent(String, Object) RedirectToPagePermanent(String, Object) RedirectToPagePermanent(String, Object)

Redirects (Status301MovedPermanently) to the specified pageName using the specified routeValues.

(Inherited from ControllerBase)
RedirectToPagePermanent(String, String) RedirectToPagePermanent(String, String) RedirectToPagePermanent(String, String)

Redirects (Status301MovedPermanently) to the specified pageName using the specified pageHandler.

(Inherited from ControllerBase)
RedirectToPagePermanent(String, String, Object, String) RedirectToPagePermanent(String, String, Object, String) RedirectToPagePermanent(String, String, Object, String)

Redirects (Status301MovedPermanently) to the specified pageName using the specified routeValues and fragment.

(Inherited from ControllerBase)
RedirectToPagePermanent(String, String, String) RedirectToPagePermanent(String, String, String) RedirectToPagePermanent(String, String, String)

Redirects (Status301MovedPermanently) to the specified pageName using the specified fragment.

(Inherited from ControllerBase)
RedirectToPagePermanentPreserveMethod(String, String, Object, String) RedirectToPagePermanentPreserveMethod(String, String, Object, String) RedirectToPagePermanentPreserveMethod(String, String, Object, String)

Redirects (Status308PermanentRedirect) to the specified route with Permanent set to true and PreserveMethod set to true, using the specified pageName, routeValues, and fragment.

(Inherited from ControllerBase)
RedirectToPagePreserveMethod(String, String, Object, String) RedirectToPagePreserveMethod(String, String, Object, String) RedirectToPagePreserveMethod(String, String, Object, String)

Redirects (Status307TemporaryRedirect) to the specified page with Permanent set to false and PreserveMethod set to true, using the specified pageName, routeValues, and fragment.

(Inherited from ControllerBase)
RedirectToRoute(Object) RedirectToRoute(Object) RedirectToRoute(Object)

Redirects (Status302Found) to the specified route using the specified routeValues.

(Inherited from ControllerBase)
RedirectToRoute(String) RedirectToRoute(String) RedirectToRoute(String)

Redirects (Status302Found) to the specified route using the specified routeName.

(Inherited from ControllerBase)
RedirectToRoute(String, Object) RedirectToRoute(String, Object) RedirectToRoute(String, Object)

Redirects (Status302Found) to the specified route using the specified routeName and routeValues.

(Inherited from ControllerBase)
RedirectToRoute(String, Object, String) RedirectToRoute(String, Object, String) RedirectToRoute(String, Object, String)

Redirects (Status302Found) to the specified route using the specified routeName, routeValues, and fragment.

(Inherited from ControllerBase)
RedirectToRoute(String, String) RedirectToRoute(String, String) RedirectToRoute(String, String)

Redirects (Status302Found) to the specified route using the specified routeName and fragment.

(Inherited from ControllerBase)
RedirectToRoutePermanent(Object) RedirectToRoutePermanent(Object) RedirectToRoutePermanent(Object)

Redirects (Status301MovedPermanently) to the specified route with Permanent set to true using the specified routeValues.

(Inherited from ControllerBase)
RedirectToRoutePermanent(String) RedirectToRoutePermanent(String) RedirectToRoutePermanent(String)

Redirects (Status301MovedPermanently) to the specified route with Permanent set to true using the specified routeName.

(Inherited from ControllerBase)
RedirectToRoutePermanent(String, Object) RedirectToRoutePermanent(String, Object) RedirectToRoutePermanent(String, Object)

Redirects (Status301MovedPermanently) to the specified route with Permanent set to true using the specified routeName and routeValues.

(Inherited from ControllerBase)
RedirectToRoutePermanent(String, Object, String) RedirectToRoutePermanent(String, Object, String) RedirectToRoutePermanent(String, Object, String)

Redirects (Status301MovedPermanently) to the specified route with Permanent set to true using the specified routeName, routeValues, and fragment.

(Inherited from ControllerBase)
RedirectToRoutePermanent(String, String) RedirectToRoutePermanent(String, String) RedirectToRoutePermanent(String, String)

Redirects (Status301MovedPermanently) to the specified route with Permanent set to true using the specified routeName and fragment.

(Inherited from ControllerBase)
RedirectToRoutePermanentPreserveMethod(String, Object, String) RedirectToRoutePermanentPreserveMethod(String, Object, String) RedirectToRoutePermanentPreserveMethod(String, Object, String)

Redirects (Status308PermanentRedirect) to the specified route with Permanent set to true and PreserveMethod set to true, using the specified routeName, routeValues, and fragment.

(Inherited from ControllerBase)
RedirectToRoutePreserveMethod(String, Object, String) RedirectToRoutePreserveMethod(String, Object, String) RedirectToRoutePreserveMethod(String, Object, String)

Redirects (Status307TemporaryRedirect) to the specified route with Permanent set to false and PreserveMethod set to true, using the specified routeName, routeValues, and fragment.

(Inherited from ControllerBase)
SignIn(ClaimsPrincipal, AuthenticationProperties, String) SignIn(ClaimsPrincipal, AuthenticationProperties, String) SignIn(ClaimsPrincipal, AuthenticationProperties, String)

Creates a SignInResult with the specified specified authentication scheme and properties.

(Inherited from ControllerBase)
SignIn(ClaimsPrincipal, AuthenticationProperties, String) SignIn(ClaimsPrincipal, AuthenticationProperties, String) SignIn(ClaimsPrincipal, AuthenticationProperties, String)

Creates a SignInResult with the specified authentication scheme and properties.

(Inherited from ControllerBase)
SignIn(ClaimsPrincipal, String) SignIn(ClaimsPrincipal, String) SignIn(ClaimsPrincipal, String)

Creates a SignInResult with the specified authentication scheme.

(Inherited from ControllerBase)
SignOut(AuthenticationProperties, String[]) SignOut(AuthenticationProperties, String[]) SignOut(AuthenticationProperties, String[])

Creates a SignOutResult with the specified specified authentication schemes and properties.

(Inherited from ControllerBase)
SignOut(AuthenticationProperties, String[]) SignOut(AuthenticationProperties, String[]) SignOut(AuthenticationProperties, String[])

Creates a SignOutResult with the specified authentication schemes and properties.

(Inherited from ControllerBase)
SignOut(String[]) SignOut(String[]) SignOut(String[])

Creates a SignOutResult with the specified authentication schemes.

(Inherited from ControllerBase)
StatusCode(Int32) StatusCode(Int32) StatusCode(Int32)

Creates a StatusCodeResult object by specifying a statusCode.

(Inherited from ControllerBase)
StatusCode(Int32, Object) StatusCode(Int32, Object) StatusCode(Int32, Object)

Creates a ObjectResult object by specifying a statusCode and value

(Inherited from ControllerBase)
TryUpdateModelAsync(Object, Type, String) TryUpdateModelAsync(Object, Type, String) TryUpdateModelAsync(Object, Type, String)

Updates the specified model instance using values from the controller's current IValueProvider and a prefix.

(Inherited from ControllerBase)
TryUpdateModelAsync(Object, Type, String, IValueProvider, Func<ModelMetadata,Boolean>) TryUpdateModelAsync(Object, Type, String, IValueProvider, Func<ModelMetadata,Boolean>) TryUpdateModelAsync(Object, Type, String, IValueProvider, Func<ModelMetadata,Boolean>)

Updates the specified model instance using the valueProvider and a prefix.

(Inherited from ControllerBase)
TryUpdateModelAsync<TModel>(TModel) TryUpdateModelAsync<TModel>(TModel) TryUpdateModelAsync<TModel>(TModel)

Updates the specified model instance using values from the controller's current IValueProvider.

(Inherited from ControllerBase)
TryUpdateModelAsync<TModel>(TModel, String) TryUpdateModelAsync<TModel>(TModel, String) TryUpdateModelAsync<TModel>(TModel, String)

Updates the specified model instance using values from the controller's current IValueProvider and a prefix.

(Inherited from ControllerBase)
TryUpdateModelAsync<TModel>(TModel, String, Expression<Func<TModel,Object>>[]) TryUpdateModelAsync<TModel>(TModel, String, Expression<Func<TModel,Object>>[]) TryUpdateModelAsync<TModel>(TModel, String, Expression<Func<TModel,Object>>[])

Updates the specified model instance using values from the controller's current IValueProvider and a prefix.

(Inherited from ControllerBase)
TryUpdateModelAsync<TModel>(TModel, String, Func<ModelMetadata,Boolean>) TryUpdateModelAsync<TModel>(TModel, String, Func<ModelMetadata,Boolean>) TryUpdateModelAsync<TModel>(TModel, String, Func<ModelMetadata,Boolean>)

Updates the specified model instance using values from the controller's current IValueProvider and a prefix.

(Inherited from ControllerBase)
TryUpdateModelAsync<TModel>(TModel, String, IValueProvider) TryUpdateModelAsync<TModel>(TModel, String, IValueProvider) TryUpdateModelAsync<TModel>(TModel, String, IValueProvider)

Updates the specified model instance using the valueProvider and a prefix.

(Inherited from ControllerBase)
TryUpdateModelAsync<TModel>(TModel, String, IValueProvider, Expression<Func<TModel,Object>>[]) TryUpdateModelAsync<TModel>(TModel, String, IValueProvider, Expression<Func<TModel,Object>>[]) TryUpdateModelAsync<TModel>(TModel, String, IValueProvider, Expression<Func<TModel,Object>>[])

Updates the specified model instance using the valueProvider and a prefix.

(Inherited from ControllerBase)
TryUpdateModelAsync<TModel>(TModel, String, IValueProvider, Func<ModelMetadata,Boolean>) TryUpdateModelAsync<TModel>(TModel, String, IValueProvider, Func<ModelMetadata,Boolean>) TryUpdateModelAsync<TModel>(TModel, String, IValueProvider, Func<ModelMetadata,Boolean>)

Updates the specified model instance using the valueProvider and a prefix.

(Inherited from ControllerBase)
TryValidateModel(Object) TryValidateModel(Object) TryValidateModel(Object)

Validates the specified model instance.

(Inherited from ControllerBase)
TryValidateModel(Object, String) TryValidateModel(Object, String) TryValidateModel(Object, String)

Validates the specified model instance.

(Inherited from ControllerBase)
Unauthorized() Unauthorized() Unauthorized()

Creates an UnauthorizedResult that produces an Status401Unauthorized response.

(Inherited from ControllerBase)
UnprocessableEntity() UnprocessableEntity() UnprocessableEntity()

Creates an UnprocessableEntityResult that produces a Status422UnprocessableEntity response.

(Inherited from ControllerBase)
UnprocessableEntity(ModelStateDictionary) UnprocessableEntity(ModelStateDictionary) UnprocessableEntity(ModelStateDictionary)

Creates an UnprocessableEntityObjectResult that produces a Status422UnprocessableEntity response.

(Inherited from ControllerBase)
UnprocessableEntity(Object) UnprocessableEntity(Object) UnprocessableEntity(Object)

Creates an UnprocessableEntityObjectResult that produces a Status422UnprocessableEntity response.

(Inherited from ControllerBase)
ValidationProblem() ValidationProblem() ValidationProblem()

Creates an BadRequestObjectResult that produces a Status400BadRequest response with validation errors from ModelState.

(Inherited from ControllerBase)
ValidationProblem(ModelStateDictionary) ValidationProblem(ModelStateDictionary) ValidationProblem(ModelStateDictionary)

Creates an BadRequestObjectResult that produces a Status400BadRequest response.

(Inherited from ControllerBase)
ValidationProblem(ValidationProblemDetails) ValidationProblem(ValidationProblemDetails) ValidationProblem(ValidationProblemDetails)

Creates an BadRequestObjectResult that produces a Status400BadRequest response.

(Inherited from ControllerBase)
View() View() View()

Creates a ViewResult object that renders a view to the response.

View(Object) View(Object) View(Object)

Creates a ViewResult object by specifying a model to be rendered by the view.

View(String) View(String) View(String)

Creates a ViewResult object by specifying a viewName.

View(String, Object) View(String, Object) View(String, Object)

Creates a ViewResult object by specifying a viewName and the model to be rendered by the view.

ViewComponent(String) ViewComponent(String) ViewComponent(String)

Creates a ViewComponentResult by specifying the name of a view component to render.

ViewComponent(String, Object) ViewComponent(String, Object) ViewComponent(String, Object)

Creates a ViewComponentResult by specifying the name of a view component to render.

ViewComponent(Type) ViewComponent(Type) ViewComponent(Type)

Creates a ViewComponentResult by specifying the Type of a view component to render.

ViewComponent(Type, Object) ViewComponent(Type, Object) ViewComponent(Type, Object)

Creates a ViewComponentResult by specifying the Type of a view component to render.

Applies to