Movatterモバイル変換


[0]ホーム

URL:


Skip to main contentSkip to in-page navigation

This browser is no longer supported.

Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.

Download Microsoft EdgeMore info about Internet Explorer and Microsoft Edge
Table of contentsExit focus mode

Controller Class

Definition

Namespace:
Microsoft.AspNetCore.Mvc
Assembly:
Microsoft.AspNetCore.Mvc.ViewFeatures.dll
Package:
Microsoft.AspNetCore.Mvc.ViewFeatures v1.0.0
Package:
Microsoft.AspNetCore.Mvc.ViewFeatures v1.1.0
Package:
Microsoft.AspNetCore.App.Ref v10.0.0-preview.5.25277.114
Package:
Microsoft.AspNetCore.Mvc.ViewFeatures v2.0.0
Package:
Microsoft.AspNetCore.Mvc.ViewFeatures v2.1.0
Package:
Microsoft.AspNetCore.Mvc.ViewFeatures v2.2.0
Package:
Microsoft.AspNetCore.App.Ref v3.0.1
Package:
Microsoft.AspNetCore.App.Ref v3.1.10
Package:
Microsoft.AspNetCore.App.Ref v5.0.0
Package:
Microsoft.AspNetCore.App.Ref v6.0.6
Package:
Microsoft.AspNetCore.App.Ref v7.0.5
Package:
Microsoft.AspNetCore.App.Ref v8.0.0
Package:
Microsoft.AspNetCore.App.Ref v9.0.2
Source:
Controller.cs
Source:
Controller.cs
Source:
Controller.cs

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

A base class for an MVC controller with view support.

public ref class Controller abstract : Microsoft::AspNetCore::Mvc::ControllerBase, IDisposable, Microsoft::AspNetCore::Mvc::Filters::IActionFilter, Microsoft::AspNetCore::Mvc::Filters::IAsyncActionFilter
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 ControllerInherits ControllerBaseImplements IActionFilter, IAsyncActionFilter, IDisposable
Inheritance
Implements

Constructors

Controller()

Properties

ControllerContext

Gets or sets theControllerContext.

(Inherited fromControllerBase)
HttpContext

Gets theHttpContext for the executing action.

(Inherited fromControllerBase)
MetadataProvider

Gets or sets theIModelMetadataProvider.

(Inherited fromControllerBase)
ModelBinderFactory

Gets or sets theIModelBinderFactory.

(Inherited fromControllerBase)
ModelState

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

(Inherited fromControllerBase)
ObjectValidator

Gets or sets theIObjectModelValidator.

(Inherited fromControllerBase)
ProblemDetailsFactory

Gets or sets theProblemDetailsFactory.

(Inherited fromControllerBase)
Request

Gets theHttpRequest for the executing action.

(Inherited fromControllerBase)
Response

Gets theHttpResponse for the executing action.

(Inherited fromControllerBase)
RouteData

Gets theRouteData for the executing action.

(Inherited fromControllerBase)
TempData

Gets or setsITempDataDictionary used byViewResult.

Url

Gets or sets theIUrlHelper.

(Inherited fromControllerBase)
User

Gets theClaimsPrincipal for user associated with the executing action.

(Inherited fromControllerBase)
ViewBag

Gets the dynamic view bag.

ViewData

Gets or setsViewDataDictionary used byViewResult andViewBag.

Methods

Accepted()

Creates anAcceptedResult object that produces aStatus202Accepted response.

(Inherited fromControllerBase)
Accepted(Object)

Creates anAcceptedResult object that produces aStatus202Accepted response.

(Inherited fromControllerBase)
Accepted(String, Object)

Creates anAcceptedResult object that produces aStatus202Accepted response.

(Inherited fromControllerBase)
Accepted(String)

Creates anAcceptedResult object that produces aStatus202Accepted response.

(Inherited fromControllerBase)
Accepted(Uri, Object)

Creates anAcceptedResult object that produces aStatus202Accepted response.

(Inherited fromControllerBase)
Accepted(Uri)

Creates anAcceptedResult object that produces aStatus202Accepted response.

(Inherited fromControllerBase)
AcceptedAtAction(String, Object, Object)

Creates anAcceptedAtActionResult object that produces aStatus202Accepted response.

(Inherited fromControllerBase)
AcceptedAtAction(String, Object)

Creates anAcceptedAtActionResult object that produces aStatus202Accepted response.

(Inherited fromControllerBase)
AcceptedAtAction(String, String, Object, Object)

Creates anAcceptedAtActionResult object that produces aStatus202Accepted response.

(Inherited fromControllerBase)
AcceptedAtAction(String, String, Object)

Creates anAcceptedAtActionResult object that produces aStatus202Accepted response.

(Inherited fromControllerBase)
AcceptedAtAction(String, String)

Creates anAcceptedAtActionResult object that produces aStatus202Accepted response.

(Inherited fromControllerBase)
AcceptedAtAction(String)

Creates anAcceptedAtActionResult object that produces aStatus202Accepted response.

(Inherited fromControllerBase)
AcceptedAtRoute(Object, Object)

Creates anAcceptedAtRouteResult object that produces aStatus202Accepted response.

(Inherited fromControllerBase)
AcceptedAtRoute(Object)

Creates anAcceptedAtRouteResult object that produces aStatus202Accepted response.

(Inherited fromControllerBase)
AcceptedAtRoute(String, Object, Object)

Creates anAcceptedAtRouteResult object that produces aStatus202Accepted response.

(Inherited fromControllerBase)
AcceptedAtRoute(String, Object)

Creates anAcceptedAtRouteResult object that produces aStatus202Accepted response.

(Inherited fromControllerBase)
AcceptedAtRoute(String)

Creates anAcceptedAtRouteResult object that produces aStatus202Accepted response.

(Inherited fromControllerBase)
BadRequest()

Creates aBadRequestResult that produces aStatus400BadRequest response.

(Inherited fromControllerBase)
BadRequest(ModelStateDictionary)

Creates aBadRequestObjectResult that produces aStatus400BadRequest response.

(Inherited fromControllerBase)
BadRequest(Object)

Creates aBadRequestObjectResult that produces aStatus400BadRequest response.

(Inherited fromControllerBase)
Challenge()

Creates aChallengeResult.

(Inherited fromControllerBase)
Challenge(AuthenticationProperties, String[])

Creates aChallengeResult with the specified specified authentication schemes andproperties.

(Inherited fromControllerBase)
Challenge(AuthenticationProperties, String[])

Creates aChallengeResult with the specified authentication schemes andproperties.

(Inherited fromControllerBase)
Challenge(AuthenticationProperties)

Creates aChallengeResult with the specifiedproperties.

(Inherited fromControllerBase)
Challenge(AuthenticationProperties)

Creates aChallengeResult with the specifiedproperties.

(Inherited fromControllerBase)
Challenge(String[])

Creates aChallengeResult with the specified authentication schemes.

(Inherited fromControllerBase)
Conflict()

Creates aConflictResult that produces aStatus409Conflict response.

(Inherited fromControllerBase)
Conflict(ModelStateDictionary)

Creates aConflictObjectResult that produces aStatus409Conflict response.

(Inherited fromControllerBase)
Conflict(Object)

Creates aConflictObjectResult that produces aStatus409Conflict response.

(Inherited fromControllerBase)
Content(String, MediaTypeHeaderValue)

Creates aContentResult object by specifying acontent string and acontentType.

(Inherited fromControllerBase)
Content(String, String, Encoding)

Creates aContentResult object by specifying acontent string, acontentType, andcontentEncoding.

(Inherited fromControllerBase)
Content(String, String)

Creates aContentResult object by specifying acontent string and a content type.

(Inherited fromControllerBase)
Content(String)

Creates aContentResult object by specifying acontent string.

(Inherited fromControllerBase)
Created()

Creates aCreatedResult object that produces aStatus201Created response.

(Inherited fromControllerBase)
Created(String, Object)

Creates aCreatedResult object that produces aStatus201Created response.

(Inherited fromControllerBase)
Created(Uri, Object)

Creates aCreatedResult object that produces aStatus201Created response.

(Inherited fromControllerBase)
CreatedAtAction(String, Object, Object)

Creates aCreatedAtActionResult object that produces aStatus201Created response.

(Inherited fromControllerBase)
CreatedAtAction(String, Object)

Creates aCreatedAtActionResult object that produces aStatus201Created response.

(Inherited fromControllerBase)
CreatedAtAction(String, String, Object, Object)

Creates aCreatedAtActionResult object that produces aStatus201Created response.

(Inherited fromControllerBase)
CreatedAtRoute(Object, Object)

Creates aCreatedAtRouteResult object that produces aStatus201Created response.

(Inherited fromControllerBase)
CreatedAtRoute(String, Object, Object)

Creates aCreatedAtRouteResult object that produces aStatus201Created response.

(Inherited fromControllerBase)
CreatedAtRoute(String, Object)

Creates aCreatedAtRouteResult object that produces aStatus201Created response.

(Inherited fromControllerBase)
Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

Dispose(Boolean)

Releases all resources currently used by thisController instance.

File(Byte[], String, Boolean)

Returns a file with the specifiedfileContents as content (Status200OK),and the specifiedcontentType as the Content-Type.This supports range requests (Status206PartialContent orStatus416RangeNotSatisfiable if the range is not satisfiable).

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

Returns a file with the specifiedfileContents as content (Status200OK),and the specifiedcontentType as the Content-Type.This supports range requests (Status206PartialContent orStatus416RangeNotSatisfiable if the range is not satisfiable).

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

Returns a file with the specifiedfileContents as content (Status200OK),and the specifiedcontentType as the Content-Type.This supports range requests (Status206PartialContent orStatus416RangeNotSatisfiable if the range is not satisfiable).

(Inherited fromControllerBase)
File(Byte[], String, String, Boolean)

Returns a file with the specifiedfileContents as content (Status200OK), thespecifiedcontentType as the Content-Type and the specifiedfileDownloadName as the suggested file name.This supports range requests (Status206PartialContent orStatus416RangeNotSatisfiable if the range is not satisfiable).

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

Returns a file with the specifiedfileContents as content (Status200OK), thespecifiedcontentType as the Content-Type, and the specifiedfileDownloadName as the suggested file name.This supports range requests (Status206PartialContent orStatus416RangeNotSatisfiable if the range is not satisfiable).

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

Returns a file with the specifiedfileContents as content (Status200OK), thespecifiedcontentType as the Content-Type, and the specifiedfileDownloadName as the suggested file name.This supports range requests (Status206PartialContent orStatus416RangeNotSatisfiable if the range is not satisfiable).

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

Returns a file with the specifiedfileContents as content (Status200OK), thespecifiedcontentType as the Content-Type and the specifiedfileDownloadName as the suggested file name.This supports range requests (Status206PartialContent orStatus416RangeNotSatisfiable if the range is not satisfiable).

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

Returns a file with the specifiedfileContents as content (Status200OK),and the specifiedcontentType as the Content-Type.This supports range requests (Status206PartialContent orStatus416RangeNotSatisfiable if the range is not satisfiable).

(Inherited fromControllerBase)
File(Stream, String, Boolean)

Returns a file in the specifiedfileStream (Status200OK), with thespecifiedcontentType as the Content-Type.This supports range requests (Status206PartialContent orStatus416RangeNotSatisfiable if the range is not satisfiable).

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

Returns a file in the specifiedfileStream (Status200OK),and the specifiedcontentType as the Content-Type.This supports range requests (Status206PartialContent orStatus416RangeNotSatisfiable if the range is not satisfiable).

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

Returns a file in the specifiedfileStream (Status200OK),and the specifiedcontentType as the Content-Type.This supports range requests (Status206PartialContent orStatus416RangeNotSatisfiable if the range is not satisfiable).

(Inherited fromControllerBase)
File(Stream, String, String, Boolean)

Returns a file in the specifiedfileStream (Status200OK) with thespecifiedcontentType as the Content-Type and thespecifiedfileDownloadName as the suggested file name.This supports range requests (Status206PartialContent orStatus416RangeNotSatisfiable if the range is not satisfiable).

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

Returns a file in the specifiedfileStream (Status200OK), thespecifiedcontentType as the Content-Type, and the specifiedfileDownloadName as the suggested file name.This supports range requests (Status206PartialContent orStatus416RangeNotSatisfiable if the range is not satisfiable).

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

Returns a file in the specifiedfileStream (Status200OK), thespecifiedcontentType as the Content-Type, and the specifiedfileDownloadName as the suggested file name.This supports range requests (Status206PartialContent orStatus416RangeNotSatisfiable if the range is not satisfiable).

(Inherited fromControllerBase)
File(Stream, String, String)

Returns a file in the specifiedfileStream (Status200OK) with thespecifiedcontentType as the Content-Type and thespecifiedfileDownloadName as the suggested file name.This supports range requests (Status206PartialContent orStatus416RangeNotSatisfiable if the range is not satisfiable).

(Inherited fromControllerBase)
File(Stream, String)

Returns a file in the specifiedfileStream (Status200OK), with thespecifiedcontentType as the Content-Type.This supports range requests (Status206PartialContent orStatus416RangeNotSatisfiable if the range is not satisfiable).

(Inherited fromControllerBase)
File(String, String, Boolean)

Returns the file specified byvirtualPath (Status200OK) with thespecifiedcontentType as the Content-Type.This supports range requests (Status206PartialContent orStatus416RangeNotSatisfiable if the range is not satisfiable).

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

Returns the file specified byvirtualPath (Status200OK), and thespecifiedcontentType as the Content-Type.This supports range requests (Status206PartialContent orStatus416RangeNotSatisfiable if the range is not satisfiable).

(Inherited fromControllerBase)
File(String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue)

Returns the file specified byvirtualPath (Status200OK), and thespecifiedcontentType as the Content-Type.This supports range requests (Status206PartialContent orStatus416RangeNotSatisfiable if the range is not satisfiable).

(Inherited fromControllerBase)
File(String, String, String, Boolean)

Returns the file specified byvirtualPath (Status200OK) with thespecifiedcontentType as the Content-Type and thespecifiedfileDownloadName as the suggested file name.This supports range requests (Status206PartialContent orStatus416RangeNotSatisfiable if the range is not satisfiable).

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

Returns the file specified byvirtualPath (Status200OK), thespecifiedcontentType as the Content-Type, and the specifiedfileDownloadName as the suggested file name.This supports range requests (Status206PartialContent orStatus416RangeNotSatisfiable if the range is not satisfiable).

(Inherited fromControllerBase)
File(String, String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue)

Returns the file specified byvirtualPath (Status200OK), thespecifiedcontentType as the Content-Type, and the specifiedfileDownloadName as the suggested file name.This supports range requests (Status206PartialContent orStatus416RangeNotSatisfiable if the range is not satisfiable).

(Inherited fromControllerBase)
File(String, String, String)

Returns the file specified byvirtualPath (Status200OK) with thespecifiedcontentType as the Content-Type and thespecifiedfileDownloadName as the suggested file name.This supports range requests (Status206PartialContent orStatus416RangeNotSatisfiable if the range is not satisfiable).

(Inherited fromControllerBase)
File(String, String)

Returns the file specified byvirtualPath (Status200OK) with thespecifiedcontentType as the Content-Type.This supports range requests (Status206PartialContent orStatus416RangeNotSatisfiable if the range is not satisfiable).

(Inherited fromControllerBase)
Forbid()

Creates aForbidResult (Status403Forbidden by default).

(Inherited fromControllerBase)
Forbid(AuthenticationProperties, String[])

Creates aForbidResult (Status403Forbidden by default) with thespecified authentication schemes andproperties.

(Inherited fromControllerBase)
Forbid(AuthenticationProperties, String[])

Creates aForbidResult with the specified specified authentication schemes andproperties.

(Inherited fromControllerBase)
Forbid(AuthenticationProperties)

Creates aForbidResult (Status403Forbidden by default) with thespecifiedproperties.

(Inherited fromControllerBase)
Forbid(AuthenticationProperties)

Creates aForbidResult with the specifiedproperties.

(Inherited fromControllerBase)
Forbid(String[])

Creates aForbidResult (Status403Forbidden by default) with thespecified authentication schemes.

(Inherited fromControllerBase)
Json(Object, JsonSerializerSettings)

Creates aJsonResult object that serializes the specifieddata objectto JSON.

Json(Object, Object)

Creates aJsonResult object that serializes the specifieddata objectto JSON.

Json(Object)

Creates aJsonResult object that serializes the specifieddata objectto JSON.

LocalRedirect(String)

Creates aLocalRedirectResult object that redirects(Status302Found) to the specified locallocalUrl.

(Inherited fromControllerBase)
LocalRedirectPermanent(String)

Creates aLocalRedirectResult object withPermanent set totrue (Status301MovedPermanently) using the specifiedlocalUrl.

(Inherited fromControllerBase)
LocalRedirectPermanentPreserveMethod(String)

Creates aLocalRedirectResult object withPermanent set totrue andPreserveMethod set to true(Status308PermanentRedirect) using the specifiedlocalUrl.

(Inherited fromControllerBase)
LocalRedirectPreserveMethod(String)

Creates aLocalRedirectResult object withPermanent set tofalse andPreserveMethod set to true(Status307TemporaryRedirect) using the specifiedlocalUrl.

(Inherited fromControllerBase)
NoContent()

Creates aNoContentResult object that produces an emptyStatus204NoContent response.

(Inherited fromControllerBase)
NotFound()

Creates aNotFoundResult that produces aStatus404NotFound response.

(Inherited fromControllerBase)
NotFound(Object)

Creates aNotFoundObjectResult that produces aStatus404NotFound response.

(Inherited fromControllerBase)
Ok()

Creates anOkResult object that produces an emptyStatus200OK response.

(Inherited fromControllerBase)
Ok(Object)

Creates anOkObjectResult object that produces aStatus200OK response.

(Inherited fromControllerBase)
OnActionExecuted(ActionExecutedContext)

Called after the action method is invoked.

OnActionExecuting(ActionExecutingContext)

Called before the action method is invoked.

OnActionExecutionAsync(ActionExecutingContext, ActionExecutionDelegate)

Called before the action method is invoked.

PartialView()

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

PartialView(Object)

Creates aPartialViewResult object by specifying amodelto be rendered by the partial view.

PartialView(String, Object)

Creates aPartialViewResult object by specifying aviewNameand themodel to be rendered by the partial view.

PartialView(String)

Creates aPartialViewResult object by specifying aviewName.

PhysicalFile(String, String, Boolean)

Returns the file specified byphysicalPath (Status200OK) with thespecifiedcontentType as the Content-Type.This supports range requests (Status206PartialContent orStatus416RangeNotSatisfiable if the range is not satisfiable).

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

Returns the file specified byphysicalPath (Status200OK), andthe specifiedcontentType as the Content-Type.This supports range requests (Status206PartialContent orStatus416RangeNotSatisfiable if the range is not satisfiable).

(Inherited fromControllerBase)
PhysicalFile(String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue)

Returns the file specified byphysicalPath (Status200OK), andthe specifiedcontentType as the Content-Type.This supports range requests (Status206PartialContent orStatus416RangeNotSatisfiable if the range is not satisfiable).

(Inherited fromControllerBase)
PhysicalFile(String, String, String, Boolean)

Returns the file specified byphysicalPath (Status200OK) with thespecifiedcontentType as the Content-Type and thespecifiedfileDownloadName as the suggested file name.This supports range requests (Status206PartialContent orStatus416RangeNotSatisfiable if the range is not satisfiable).

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

Returns the file specified byphysicalPath (Status200OK), thespecifiedcontentType as the Content-Type, and the specifiedfileDownloadName as the suggested file name.This supports range requests (Status206PartialContent orStatus416RangeNotSatisfiable if the range is not satisfiable).

(Inherited fromControllerBase)
PhysicalFile(String, String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue)

Returns the file specified byphysicalPath (Status200OK), thespecifiedcontentType as the Content-Type, and the specifiedfileDownloadName as the suggested file name.This supports range requests (Status206PartialContent orStatus416RangeNotSatisfiable if the range is not satisfiable).

(Inherited fromControllerBase)
PhysicalFile(String, String, String)

Returns the file specified byphysicalPath (Status200OK) with thespecifiedcontentType as the Content-Type and thespecifiedfileDownloadName as the suggested file name.This supports range requests (Status206PartialContent orStatus416RangeNotSatisfiable if the range is not satisfiable).

(Inherited fromControllerBase)
PhysicalFile(String, String)

Returns the file specified byphysicalPath (Status200OK) with thespecifiedcontentType as the Content-Type.This supports range requests (Status206PartialContent orStatus416RangeNotSatisfiable if the range is not satisfiable).

(Inherited fromControllerBase)
Problem(String, String, Nullable<Int32>, String, String, IDictionary<String,Object>)

Creates anObjectResult that produces aProblemDetails response.

(Inherited fromControllerBase)
Problem(String, String, Nullable<Int32>, String, String)

Creates anObjectResult that produces aProblemDetails response.

(Inherited fromControllerBase)
Redirect(String)

Creates aRedirectResult object that redirects (Status302Found)to the specifiedurl.

(Inherited fromControllerBase)
RedirectPermanent(String)

Creates aRedirectResult object withPermanent set to true(Status301MovedPermanently) using the specifiedurl.

(Inherited fromControllerBase)
RedirectPermanentPreserveMethod(String)

Creates aRedirectResult object withPermanent set to trueandPreserveMethod set to true (Status308PermanentRedirect)using the specifiedurl.

(Inherited fromControllerBase)
RedirectPreserveMethod(String)

Creates aRedirectResult object withPermanent set to falseandPreserveMethod set to true (Status307TemporaryRedirect)using the specifiedurl.

(Inherited fromControllerBase)
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 fromControllerBase)
RedirectToAction(String, Object)

Redirects (Status302Found) to the specified action using theactionName androuteValues.

(Inherited fromControllerBase)
RedirectToAction(String, String, Object, String)

Redirects (Status302Found) to the specified action using the specifiedactionName,controllerName,routeValues, andfragment.

(Inherited fromControllerBase)
RedirectToAction(String, String, Object)

Redirects (Status302Found) to the specified action using the specifiedactionName,controllerName, androuteValues.

(Inherited fromControllerBase)
RedirectToAction(String, String, String)

Redirects (Status302Found) to the specified action using the specifiedactionName,controllerName, andfragment.

(Inherited fromControllerBase)
RedirectToAction(String, String)

Redirects (Status302Found) to the specified action using theactionName and thecontrollerName.

(Inherited fromControllerBase)
RedirectToAction(String)

Redirects (Status302Found) to the specified action using theactionName.

(Inherited fromControllerBase)
RedirectToActionPermanent(String, Object)

Redirects (Status301MovedPermanently) to the specified action withPermanent set to true using the specifiedactionNameandrouteValues.

(Inherited fromControllerBase)
RedirectToActionPermanent(String, String, Object, String)

Redirects (Status301MovedPermanently) to the specified action withPermanent set to true using the specifiedactionName,controllerName,routeValues, andfragment.

(Inherited fromControllerBase)
RedirectToActionPermanent(String, String, Object)

Redirects (Status301MovedPermanently) to the specified action withPermanent set to true using the specifiedactionName,controllerName, androuteValues.

(Inherited fromControllerBase)
RedirectToActionPermanent(String, String, String)

Redirects (Status301MovedPermanently) to the specified action withPermanent set to true using the specifiedactionName,controllerName, andfragment.

(Inherited fromControllerBase)
RedirectToActionPermanent(String, String)

Redirects (Status301MovedPermanently) to the specified action withPermanent set to true using the specifiedactionNameandcontrollerName.

(Inherited fromControllerBase)
RedirectToActionPermanent(String)

Redirects (Status301MovedPermanently) to the specified action withPermanent set to true using the specifiedactionName.

(Inherited fromControllerBase)
RedirectToActionPermanentPreserveMethod(String, String, Object, String)

Redirects (Status308PermanentRedirect) to the specified action withPermanent set to true andPreserveMethodset to true, using the specifiedactionName,controllerName,routeValues, andfragment.

(Inherited fromControllerBase)
RedirectToActionPreserveMethod(String, String, Object, String)

Redirects (Status307TemporaryRedirect) to the specified action withPermanent set to false andPreserveMethodset to true, using the specifiedactionName,controllerName,routeValues, andfragment.

(Inherited fromControllerBase)
RedirectToPage(String, Object)

Redirects (Status302Found) to the specifiedpageNameusing the specifiedrouteValues.

(Inherited fromControllerBase)
RedirectToPage(String, String, Object, String)

Redirects (Status302Found) to the specifiedpageNameusing the specifiedrouteValues andfragment.

(Inherited fromControllerBase)
RedirectToPage(String, String, Object)

Redirects (Status302Found) to the specifiedpageName.

(Inherited fromControllerBase)
RedirectToPage(String, String, String)

Redirects (Status302Found) to the specifiedpageNameusing the specifiedfragment.

(Inherited fromControllerBase)
RedirectToPage(String, String)

Redirects (Status302Found) to the specifiedpageNameusing the specifiedpageHandler.

(Inherited fromControllerBase)
RedirectToPage(String)

Redirects (Status302Found) to the specifiedpageName.

(Inherited fromControllerBase)
RedirectToPagePermanent(String, Object)

Redirects (Status301MovedPermanently) to the specifiedpageNameusing the specifiedrouteValues.

(Inherited fromControllerBase)
RedirectToPagePermanent(String, String, Object, String)

Redirects (Status301MovedPermanently) to the specifiedpageNameusing the specifiedrouteValues andfragment.

(Inherited fromControllerBase)
RedirectToPagePermanent(String, String, String)

Redirects (Status301MovedPermanently) to the specifiedpageNameusing the specifiedfragment.

(Inherited fromControllerBase)
RedirectToPagePermanent(String, String)

Redirects (Status301MovedPermanently) to the specifiedpageNameusing the specifiedpageHandler.

(Inherited fromControllerBase)
RedirectToPagePermanent(String)

Redirects (Status301MovedPermanently) to the specifiedpageName.

(Inherited fromControllerBase)
RedirectToPagePermanentPreserveMethod(String, String, Object, String)

Redirects (Status308PermanentRedirect) to the specified route withPermanent set to true andPreserveMethodset to true, using the specifiedpageName,routeValues, andfragment.

(Inherited fromControllerBase)
RedirectToPagePreserveMethod(String, String, Object, String)

Redirects (Status307TemporaryRedirect) to the specified page withPermanent set to false andPreserveMethodset to true, using the specifiedpageName,routeValues, andfragment.

(Inherited fromControllerBase)
RedirectToRoute(Object)

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

(Inherited fromControllerBase)
RedirectToRoute(String, Object, String)

Redirects (Status302Found) to the specified route using the specifiedrouteName,routeValues, andfragment.

(Inherited fromControllerBase)
RedirectToRoute(String, Object)

Redirects (Status302Found) to the specified route using the specifiedrouteName androuteValues.

(Inherited fromControllerBase)
RedirectToRoute(String, String)

Redirects (Status302Found) to the specified route using the specifiedrouteName andfragment.

(Inherited fromControllerBase)
RedirectToRoute(String)

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

(Inherited fromControllerBase)
RedirectToRoutePermanent(Object)

Redirects (Status301MovedPermanently) to the specified route withPermanent set to true using the specifiedrouteValues.

(Inherited fromControllerBase)
RedirectToRoutePermanent(String, Object, String)

Redirects (Status301MovedPermanently) to the specified route withPermanent set to true using the specifiedrouteName,routeValues, andfragment.

(Inherited fromControllerBase)
RedirectToRoutePermanent(String, Object)

Redirects (Status301MovedPermanently) to the specified route withPermanent set to true using the specifiedrouteNameandrouteValues.

(Inherited fromControllerBase)
RedirectToRoutePermanent(String, String)

Redirects (Status301MovedPermanently) to the specified route withPermanent set to true using the specifiedrouteNameandfragment.

(Inherited fromControllerBase)
RedirectToRoutePermanent(String)

Redirects (Status301MovedPermanently) to the specified route withPermanent set to true using the specifiedrouteName.

(Inherited fromControllerBase)
RedirectToRoutePermanentPreserveMethod(String, Object, String)

Redirects (Status308PermanentRedirect) to the specified route withPermanent set to true andPreserveMethodset to true, using the specifiedrouteName,routeValues, andfragment.

(Inherited fromControllerBase)
RedirectToRoutePreserveMethod(String, Object, String)

Redirects (Status307TemporaryRedirect) to the specified route withPermanent set to false andPreserveMethodset to true, using the specifiedrouteName,routeValues, andfragment.

(Inherited fromControllerBase)
SignIn(ClaimsPrincipal, AuthenticationProperties, String)

Creates aSignInResult with the specified specified authentication scheme andproperties.

(Inherited fromControllerBase)
SignIn(ClaimsPrincipal, AuthenticationProperties, String)

Creates aSignInResult with the specified authentication scheme andproperties.

(Inherited fromControllerBase)
SignIn(ClaimsPrincipal, AuthenticationProperties)

Creates aSignInResult withproperties.

(Inherited fromControllerBase)
SignIn(ClaimsPrincipal, String)

Creates aSignInResult with the specified authentication scheme.

(Inherited fromControllerBase)
SignIn(ClaimsPrincipal)

Creates aSignInResult.

(Inherited fromControllerBase)
SignOut()

Creates aSignOutResult.

(Inherited fromControllerBase)
SignOut(AuthenticationProperties, String[])

Creates aSignOutResult with the specified authentication schemes andproperties.

(Inherited fromControllerBase)
SignOut(AuthenticationProperties, String[])

Creates aSignOutResult with the specified specified authentication schemes andproperties.

(Inherited fromControllerBase)
SignOut(AuthenticationProperties)

Creates aSignOutResult withproperties.

(Inherited fromControllerBase)
SignOut(String[])

Creates aSignOutResult with the specified authentication schemes.

(Inherited fromControllerBase)
StatusCode(Int32, Object)

Creates anObjectResult object by specifying astatusCode andvalue

(Inherited fromControllerBase)
StatusCode(Int32)

Creates aStatusCodeResult object by specifying astatusCode.

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

Updates the specifiedmodel instance using thevalueProvider and aprefix.

(Inherited fromControllerBase)
TryUpdateModelAsync(Object, Type, String)

Updates the specifiedmodel instance using values from the controller's currentIValueProvider and aprefix.

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

Updates the specifiedmodel instance using values from the controller's currentIValueProvider and aprefix.

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

Updates the specifiedmodel instance using values from the controller's currentIValueProvider and aprefix.

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

Updates the specifiedmodel instance using thevalueProvider and aprefix.

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

Updates the specifiedmodel instance using thevalueProvider and aprefix.

(Inherited fromControllerBase)
TryUpdateModelAsync<TModel>(TModel, String, IValueProvider)

Updates the specifiedmodel instance using thevalueProvider and aprefix.

(Inherited fromControllerBase)
TryUpdateModelAsync<TModel>(TModel, String)

Updates the specifiedmodel instance using values from the controller's currentIValueProvider and aprefix.

(Inherited fromControllerBase)
TryUpdateModelAsync<TModel>(TModel)

Updates the specifiedmodel instance using values from the controller's currentIValueProvider.

(Inherited fromControllerBase)
TryValidateModel(Object, String)

Validates the specifiedmodel instance.

(Inherited fromControllerBase)
TryValidateModel(Object)

Validates the specifiedmodel instance.

(Inherited fromControllerBase)
Unauthorized()

Creates anUnauthorizedResult that produces aStatus401Unauthorized response.

(Inherited fromControllerBase)
Unauthorized(Object)

Creates anUnauthorizedObjectResult that produces aStatus401Unauthorized response.

(Inherited fromControllerBase)
UnprocessableEntity()

Creates anUnprocessableEntityResult that produces aStatus422UnprocessableEntity response.

(Inherited fromControllerBase)
UnprocessableEntity(ModelStateDictionary)

Creates anUnprocessableEntityObjectResult that produces aStatus422UnprocessableEntity response.

(Inherited fromControllerBase)
UnprocessableEntity(Object)

Creates anUnprocessableEntityObjectResult that produces aStatus422UnprocessableEntity response.

(Inherited fromControllerBase)
ValidationProblem()

Creates anActionResult that produces aStatus400BadRequest responsewith validation errors fromModelState.

(Inherited fromControllerBase)
ValidationProblem(ModelStateDictionary)

Creates anActionResult that produces aStatus400BadRequest responsewith validation errors frommodelStateDictionary.

(Inherited fromControllerBase)
ValidationProblem(String, String, Nullable<Int32>, String, String, ModelStateDictionary, IDictionary<String,Object>)

Creates anActionResult that produces aStatus400BadRequest responsewith aValidationProblemDetails value.

(Inherited fromControllerBase)
ValidationProblem(String, String, Nullable<Int32>, String, String, ModelStateDictionary)

Creates anActionResult that produces aStatus400BadRequest responsewith aValidationProblemDetails value.

(Inherited fromControllerBase)
ValidationProblem(ValidationProblemDetails)

Creates aBadRequestObjectResult that produces aStatus400BadRequest response.

(Inherited fromControllerBase)
View()

Creates aViewResult object that renders a view to the response.

View(Object)

Creates aViewResult object by specifying amodelto be rendered by the view.

View(String, Object)

Creates aViewResult object by specifying aviewNameand themodel to be rendered by the view.

View(String)

Creates aViewResult object by specifying aviewName.

ViewComponent(String, Object)

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

ViewComponent(String)

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

ViewComponent(Type, Object)

Creates aViewComponentResult by specifying theType of a view component torender.

ViewComponent(Type)

Creates aViewComponentResult by specifying theType of a view component torender.

Applies to


Feedback

Was this page helpful?

YesNo

In this article

Was this page helpful?

YesNo