Controller 類別

定義

具有檢視支援的 MVC 控制器基類。

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 Controller
Inherits ControllerBase
Implements IActionFilter, IAsyncActionFilter, IDisposable
繼承
Controller
實作

建構函式

Controller()

具有檢視支援的 MVC 控制器基類。

屬性

ControllerContext

取得或設定 ControllerContext

(繼承來源 ControllerBase)
HttpContext

HttpContext取得執行動作的 。

(繼承來源 ControllerBase)
MetadataProvider

取得或設定 IModelMetadataProvider

(繼承來源 ControllerBase)
ModelBinderFactory

取得或設定 IModelBinderFactory

(繼承來源 ControllerBase)
ModelState

取得 , ModelStateDictionary 其中包含模型和模型系結驗證的狀態。

(繼承來源 ControllerBase)
ObjectValidator

取得或設定 IObjectModelValidator

(繼承來源 ControllerBase)
ProblemDetailsFactory

取得或設定 ProblemDetailsFactory

(繼承來源 ControllerBase)
Request

HttpRequest取得執行動作的 。

(繼承來源 ControllerBase)
Response

HttpResponse取得執行動作的 。

(繼承來源 ControllerBase)
RouteData

RouteData取得執行動作的 。

(繼承來源 ControllerBase)
TempData

取得或設定 ITempDataDictionary 所使用的 ViewResult

Url

取得或設定 IUrlHelper

(繼承來源 ControllerBase)
User

ClaimsPrincipal取得與執行動作相關聯的使用者 。

(繼承來源 ControllerBase)
ViewBag

取得動態檢視包。

ViewData

取得或設定 ViewDataDictionaryViewBag 所使用的 ViewResult

方法

Accepted()

建立 AcceptedResult 產生 Status202Accepted 回應的 物件。

(繼承來源 ControllerBase)
Accepted(Object)

建立 AcceptedResult 產生 Status202Accepted 回應的 物件。

(繼承來源 ControllerBase)
Accepted(String)

建立 AcceptedResult 產生 Status202Accepted 回應的 物件。

(繼承來源 ControllerBase)
Accepted(String, Object)

建立 AcceptedResult 產生 Status202Accepted 回應的 物件。

(繼承來源 ControllerBase)
Accepted(Uri)

建立 AcceptedResult 產生 Status202Accepted 回應的 物件。

(繼承來源 ControllerBase)
Accepted(Uri, Object)

建立 AcceptedResult 產生 Status202Accepted 回應的 物件。

(繼承來源 ControllerBase)
AcceptedAtAction(String)

建立 AcceptedAtActionResult 產生 Status202Accepted 回應的 物件。

(繼承來源 ControllerBase)
AcceptedAtAction(String, Object)

建立 AcceptedAtActionResult 產生 Status202Accepted 回應的 物件。

(繼承來源 ControllerBase)
AcceptedAtAction(String, Object, Object)

建立 AcceptedAtActionResult 產生 Status202Accepted 回應的 物件。

(繼承來源 ControllerBase)
AcceptedAtAction(String, String)

建立 AcceptedAtActionResult 產生 Status202Accepted 回應的 物件。

(繼承來源 ControllerBase)
AcceptedAtAction(String, String, Object)

建立 AcceptedAtActionResult 產生 Status202Accepted 回應的 物件。

(繼承來源 ControllerBase)
AcceptedAtAction(String, String, Object, Object)

建立 AcceptedAtActionResult 產生 Status202Accepted 回應的 物件。

(繼承來源 ControllerBase)
AcceptedAtRoute(Object)

建立 AcceptedAtRouteResult 產生 Status202Accepted 回應的 物件。

(繼承來源 ControllerBase)
AcceptedAtRoute(Object, Object)

建立 AcceptedAtRouteResult 產生 Status202Accepted 回應的 物件。

(繼承來源 ControllerBase)
AcceptedAtRoute(String)

建立 AcceptedAtRouteResult 產生 Status202Accepted 回應的 物件。

(繼承來源 ControllerBase)
AcceptedAtRoute(String, Object)

建立 AcceptedAtRouteResult 產生 Status202Accepted 回應的 物件。

(繼承來源 ControllerBase)
AcceptedAtRoute(String, Object, Object)

建立 AcceptedAtRouteResult 產生 Status202Accepted 回應的 物件。

(繼承來源 ControllerBase)
BadRequest()

BadRequestResult建立產生回應的 Status400BadRequest

(繼承來源 ControllerBase)
BadRequest(ModelStateDictionary)

BadRequestObjectResult建立產生回應的 Status400BadRequest

(繼承來源 ControllerBase)
BadRequest(Object)

BadRequestObjectResult建立產生回應的 Status400BadRequest

(繼承來源 ControllerBase)
Challenge()

建立 ChallengeResult

(繼承來源 ControllerBase)
Challenge(AuthenticationProperties)

使用指定的 properties 建立 ChallengeResult

(繼承來源 ControllerBase)
Challenge(AuthenticationProperties)

使用指定的 properties 建立 ChallengeResult

(繼承來源 ControllerBase)
Challenge(AuthenticationProperties, String[])

ChallengeResult使用指定的驗證配置和 properties 建立 。

(繼承來源 ControllerBase)
Challenge(AuthenticationProperties, String[])

ChallengeResult使用指定的驗證配置和 properties 建立 。

(繼承來源 ControllerBase)
Challenge(String[])

使用指定的驗證配置建立 ChallengeResult

(繼承來源 ControllerBase)
Conflict()

ConflictResult建立產生回應的 Status409Conflict

(繼承來源 ControllerBase)
Conflict(ModelStateDictionary)

ConflictObjectResult建立產生回應的 Status409Conflict

(繼承來源 ControllerBase)
Conflict(Object)

ConflictObjectResult建立產生回應的 Status409Conflict

(繼承來源 ControllerBase)
Content(String)

藉由指定 content 字串來 ContentResult 建立 物件。

(繼承來源 ControllerBase)
Content(String, MediaTypeHeaderValue)

ContentResult藉由指定 content 字串和 contentType 來建立 物件。

(繼承來源 ControllerBase)
Content(String, String)

ContentResult藉由指定 content 字串和內容類型來建立 物件。

(繼承來源 ControllerBase)
Content(String, String, Encoding)

ContentResult藉由指定 content 字串、 contentType 、 和 contentEncoding 來建立 物件。

(繼承來源 ControllerBase)
Created()

建立 CreatedResult 產生 Status201Created 回應的 物件。

(繼承來源 ControllerBase)
Created(String, Object)

建立 CreatedResult 產生 Status201Created 回應的 物件。

(繼承來源 ControllerBase)
Created(Uri, Object)

建立 CreatedResult 產生 Status201Created 回應的 物件。

(繼承來源 ControllerBase)
CreatedAtAction(String, Object)

建立 CreatedAtActionResult 產生 Status201Created 回應的 物件。

(繼承來源 ControllerBase)
CreatedAtAction(String, Object, Object)

建立 CreatedAtActionResult 產生 Status201Created 回應的 物件。

(繼承來源 ControllerBase)
CreatedAtAction(String, String, Object, Object)

建立 CreatedAtActionResult 產生 Status201Created 回應的 物件。

(繼承來源 ControllerBase)
CreatedAtRoute(Object, Object)

建立 CreatedAtRouteResult 產生 Status201Created 回應的 物件。

(繼承來源 ControllerBase)
CreatedAtRoute(String, Object)

建立 CreatedAtRouteResult 產生 Status201Created 回應的 物件。

(繼承來源 ControllerBase)
CreatedAtRoute(String, Object, Object)

建立 CreatedAtRouteResult 產生 Status201Created 回應的 物件。

(繼承來源 ControllerBase)
Dispose()

具有檢視支援的 MVC 控制器基類。

Dispose(Boolean)

釋放此 Controller 實例目前使用的所有資源。

File(Byte[], String)

傳回指定 fileContents 為內容 () Status200OK ,以及指定 contentType 為 Content-Type 的檔案。 這支援範圍要求 (Status206PartialContent ,或 Status416RangeNotSatisfiable 範圍不符合) 。

(繼承來源 ControllerBase)
File(Byte[], String, Boolean)

傳回指定 fileContents 為內容 () Status200OK ,以及指定 contentType 為 Content-Type 的檔案。 這支援範圍要求 (Status206PartialContent ,或 Status416RangeNotSatisfiable 範圍不符合) 。

(繼承來源 ControllerBase)
File(Byte[], String, Nullable<DateTimeOffset>, EntityTagHeaderValue)

傳回指定 fileContents 為內容 () Status200OK ,以及指定 contentType 為 Content-Type 的檔案。 這支援範圍要求 (Status206PartialContent ,或 Status416RangeNotSatisfiable 範圍不符合) 。

(繼承來源 ControllerBase)
File(Byte[], String, Nullable<DateTimeOffset>, EntityTagHeaderValue, Boolean)

傳回指定 fileContents 為內容 () Status200OK ,以及指定 contentType 為 Content-Type 的檔案。 這支援範圍要求 (Status206PartialContent ,或 Status416RangeNotSatisfiable 範圍不符合) 。

(繼承來源 ControllerBase)
File(Byte[], String, String)

傳回指定 fileContents 為內容 () Status200OK 、指定 contentType 為 Content-Type 和指定 fileDownloadName 為建議檔案名的檔案。 這支援範圍要求 (Status206PartialContent ,或 Status416RangeNotSatisfiable 範圍不符合) 。

(繼承來源 ControllerBase)
File(Byte[], String, String, Boolean)

傳回指定 fileContents 為內容 () Status200OK 、指定 contentType 為 Content-Type 和指定 fileDownloadName 為建議檔案名的檔案。 這支援範圍要求 (Status206PartialContent ,或 Status416RangeNotSatisfiable 範圍不符合) 。

(繼承來源 ControllerBase)
File(Byte[], String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue)

傳回指定 fileContents 為內容 () Status200OK 、指定 contentType 為 Content-Type 的檔案,以及指定 fileDownloadName 為建議的檔案名。 這支援範圍要求 (Status206PartialContent ,或 Status416RangeNotSatisfiable 範圍不符合) 。

(繼承來源 ControllerBase)
File(Byte[], String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue, Boolean)

傳回指定 fileContents 為內容 () Status200OK 、指定 contentType 為 Content-Type 的檔案,以及指定 fileDownloadName 為建議的檔案名。 這支援範圍要求 (Status206PartialContent ,或 Status416RangeNotSatisfiable 範圍不符合) 。

(繼承來源 ControllerBase)
File(Stream, String)

傳回指定 fileStream 之 (Status200OK) 中的檔案,並指定 contentType 為 Content-Type。 這支援範圍要求 (Status206PartialContent ,或 Status416RangeNotSatisfiable 範圍不符合) 。

(繼承來源 ControllerBase)
File(Stream, String, Boolean)

傳回指定 fileStream 之 (Status200OK) 中的檔案,並指定 contentType 為 Content-Type。 這支援範圍要求 (Status206PartialContent ,或 Status416RangeNotSatisfiable 範圍不符合) 。

(繼承來源 ControllerBase)
File(Stream, String, Nullable<DateTimeOffset>, EntityTagHeaderValue)

傳回指定 fileStream () Status200OK 中的檔案,以及指定 contentType 為 Content-Type 的 。 這支援範圍要求 (Status206PartialContent ,或 Status416RangeNotSatisfiable 範圍不符合) 。

(繼承來源 ControllerBase)
File(Stream, String, Nullable<DateTimeOffset>, EntityTagHeaderValue, Boolean)

傳回指定 fileStream () Status200OK 中的檔案,以及指定 contentType 為 Content-Type 的 。 這支援範圍要求 (Status206PartialContent ,或 Status416RangeNotSatisfiable 範圍不符合) 。

(繼承來源 ControllerBase)
File(Stream, String, String)

傳回指定 fileStream 之 (Status200OK) 中的檔案,其 contentType 指定為 Content-Type,以及指定 fileDownloadName 為建議的檔案名。 這支援範圍要求 (Status206PartialContent ,或 Status416RangeNotSatisfiable 範圍不符合) 。

(繼承來源 ControllerBase)
File(Stream, String, String, Boolean)

傳回指定 fileStream 之 (Status200OK) 中的檔案,其 contentType 指定為 Content-Type,以及指定 fileDownloadName 為建議的檔案名。 這支援範圍要求 (Status206PartialContent ,或 Status416RangeNotSatisfiable 範圍不符合) 。

(繼承來源 ControllerBase)
File(Stream, String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue)

傳回指定 fileStream 之 (Status200OK) 、指定 contentType 為 Content-Type 的檔案,以及指定 fileDownloadName 為建議的檔案名。 這支援範圍要求 (Status206PartialContent ,或 Status416RangeNotSatisfiable 範圍不符合) 。

(繼承來源 ControllerBase)
File(Stream, String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue, Boolean)

傳回指定 fileStream 之 (Status200OK) 、指定 contentType 為 Content-Type 的檔案,以及指定 fileDownloadName 為建議的檔案名。 這支援範圍要求 (Status206PartialContent ,或 Status416RangeNotSatisfiable 範圍不符合) 。

(繼承來源 ControllerBase)
File(String, String)

傳回 (virtualPathStatus200OK 所指定的檔案,) 指定 contentType 為 Content-Type。 這支援範圍要求 (Status206PartialContent ,或 Status416RangeNotSatisfiable 範圍不符合) 。

(繼承來源 ControllerBase)
File(String, String, Boolean)

傳回 (virtualPathStatus200OK 所指定的檔案,) 指定 contentType 為 Content-Type。 這支援範圍要求 (Status206PartialContent ,或 Status416RangeNotSatisfiable 範圍不符合) 。

(繼承來源 ControllerBase)
File(String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue)

傳回 () Status200OK 所指定的 virtualPath 檔案,以及指定 contentType 為 Content-Type 的 。 這支援範圍要求 (Status206PartialContent ,或 Status416RangeNotSatisfiable 範圍不符合) 。

(繼承來源 ControllerBase)
File(String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue, Boolean)

傳回 () Status200OK 所指定的 virtualPath 檔案,以及指定 contentType 為 Content-Type 的 。 這支援範圍要求 (Status206PartialContent ,或 Status416RangeNotSatisfiable 範圍不符合) 。

(繼承來源 ControllerBase)
File(String, String, String)

傳回指定 virtualPath () Status200OK 指定的檔案,其 contentType 指定為 Content-Type,以及指定 fileDownloadName 為建議的檔案名。 這支援範圍要求 (Status206PartialContent ,或 Status416RangeNotSatisfiable 範圍不符合) 。

(繼承來源 ControllerBase)
File(String, String, String, Boolean)

傳回指定 virtualPath () Status200OK 指定的檔案,其 contentType 指定為 Content-Type,以及指定 fileDownloadName 為建議的檔案名。 這支援範圍要求 (Status206PartialContent ,或 Status416RangeNotSatisfiable 範圍不符合) 。

(繼承來源 ControllerBase)
File(String, String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue)

傳回 (virtualPath 指定的 Status200OK 檔案) 、指定 contentType 為 Content-Type,以及指定 fileDownloadName 為建議檔案名的 。 這支援範圍要求 (Status206PartialContent ,或 Status416RangeNotSatisfiable 範圍不符合) 。

(繼承來源 ControllerBase)
File(String, String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue, Boolean)

傳回 (virtualPath 指定的 Status200OK 檔案) 、指定 contentType 為 Content-Type,以及指定 fileDownloadName 為建議檔案名的 。 這支援範圍要求 (Status206PartialContent ,或 Status416RangeNotSatisfiable 範圍不符合) 。

(繼承來源 ControllerBase)
Forbid()

預設會建立 ForbidResult (Status403Forbidden) 。

(繼承來源 ControllerBase)
Forbid(AuthenticationProperties)

ForbidResult根據預設,使用指定的 properties 建立 (Status403Forbidden) 。

(繼承來源 ControllerBase)
Forbid(AuthenticationProperties)

使用指定的 properties 建立 ForbidResult

(繼承來源 ControllerBase)
Forbid(AuthenticationProperties, String[])

ForbidResult根據預設,使用指定的驗證配置和 properties 建立 (Status403Forbidden) 。

(繼承來源 ControllerBase)
Forbid(AuthenticationProperties, String[])

ForbidResult使用指定的驗證配置和 properties 建立 。

(繼承來源 ControllerBase)
Forbid(String[])

ForbidResultStatus403Forbidden 根據預設,使用指定的驗證配置建立) (。

(繼承來源 ControllerBase)
Json(Object)

建立 JsonResult 物件,將指定的 data 物件序列化為 JSON。

Json(Object, JsonSerializerSettings)

建立 JsonResult 物件,將指定的 data 物件序列化為 JSON。

Json(Object, Object)

建立 JsonResult 物件,將指定的 data 物件序列化為 JSON。

LocalRedirect(String)

建立 LocalRedirectResult 物件,將 (Status302Found) 重新導向至指定的本機 localUrl

(繼承來源 ControllerBase)
LocalRedirectPermanent(String)

LocalRedirectResult使用指定的 localUrl 建立物件 Permanent ,並將 Status301MovedPermanently 設定為 true () 。

(繼承來源 ControllerBase)
LocalRedirectPermanentPreserveMethod(String)

LocalRedirectResult使用指定的 localUrl 建立物件, Permanent 並將 設定為 true,並將 PreserveMethod 設定為 true (Status308PermanentRedirect) 。

(繼承來源 ControllerBase)
LocalRedirectPreserveMethod(String)

LocalRedirectResult使用指定的 localUrl 建立物件, Permanent 並將 設定為 false,並將 PreserveMethod 設定為 true (Status307TemporaryRedirect) 。

(繼承來源 ControllerBase)
NoContent()

建立 NoContentResult 產生空 Status204NoContent 回應的 物件。

(繼承來源 ControllerBase)
NotFound()

NotFoundResult建立產生回應的 Status404NotFound

(繼承來源 ControllerBase)
NotFound(Object)

NotFoundObjectResult建立產生回應的 Status404NotFound

(繼承來源 ControllerBase)
Ok()

建立 OkResult 產生空 Status200OK 回應的 物件。

(繼承來源 ControllerBase)
Ok(Object)

OkObjectResult建立產生 Status200OK 回應的物件。

(繼承來源 ControllerBase)
OnActionExecuted(ActionExecutedContext)

在叫用動作方法之後呼叫。

OnActionExecuting(ActionExecutingContext)

在叫用動作方法之前呼叫。

OnActionExecutionAsync(ActionExecutingContext, ActionExecutionDelegate)

在叫用動作方法之前呼叫。

PartialView()

建立 PartialViewResult 物件,將部分檢視轉譯至回應。

PartialView(Object)

指定要 PartialViewResult 由部分檢視轉譯的 ,以建立 物件 model

PartialView(String)

藉由指定 viewName 來建立 PartialViewResult 物件。

PartialView(String, Object)

PartialViewResult 由指定要 viewName 由部分檢視轉譯的 和 model 來建立 物件。

PhysicalFile(String, String)

傳回 (physicalPathStatus200OK 所指定的檔案,) 指定 contentType 為 Content-Type。 這支援範圍要求 (Status206PartialContent ,或 Status416RangeNotSatisfiable 範圍不符合) 。

(繼承來源 ControllerBase)
PhysicalFile(String, String, Boolean)

傳回 (physicalPathStatus200OK 所指定的檔案,) 指定 contentType 為 Content-Type。 這支援範圍要求 (Status206PartialContent ,或 Status416RangeNotSatisfiable 範圍不符合) 。

(繼承來源 ControllerBase)
PhysicalFile(String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue)

傳回 () Status200OK 所指定的 physicalPath 檔案,以及指定 contentType 為 Content-Type 的 。 這支援範圍要求 (Status206PartialContent ,或 Status416RangeNotSatisfiable 範圍不符合) 。

(繼承來源 ControllerBase)
PhysicalFile(String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue, Boolean)

傳回 () Status200OK 所指定的 physicalPath 檔案,以及指定 contentType 為 Content-Type 的 。 這支援範圍要求 (Status206PartialContent ,或 Status416RangeNotSatisfiable 範圍不符合) 。

(繼承來源 ControllerBase)
PhysicalFile(String, String, String)

傳回指定 physicalPath () Status200OK 指定的檔案,其 contentType 指定為 Content-Type,以及指定 fileDownloadName 為建議的檔案名。 這支援範圍要求 (Status206PartialContent ,或 Status416RangeNotSatisfiable 範圍不符合) 。

(繼承來源 ControllerBase)
PhysicalFile(String, String, String, Boolean)

傳回指定 physicalPath () Status200OK 指定的檔案,其 contentType 指定為 Content-Type,以及指定 fileDownloadName 為建議的檔案名。 這支援範圍要求 (Status206PartialContent ,或 Status416RangeNotSatisfiable 範圍不符合) 。

(繼承來源 ControllerBase)
PhysicalFile(String, String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue)

傳回 (physicalPath 指定的 Status200OK 檔案) 、指定 contentType 為 Content-Type,以及指定 fileDownloadName 為建議檔案名的 。 這支援範圍要求 (Status206PartialContent ,或 Status416RangeNotSatisfiable 範圍不符合) 。

(繼承來源 ControllerBase)
PhysicalFile(String, String, String, Nullable<DateTimeOffset>, EntityTagHeaderValue, Boolean)

傳回 (physicalPath 指定的 Status200OK 檔案) 、指定 contentType 為 Content-Type,以及指定 fileDownloadName 為建議檔案名的 。 這支援範圍要求 (Status206PartialContent ,或 Status416RangeNotSatisfiable 範圍不符合) 。

(繼承來源 ControllerBase)
Problem(String, String, Nullable<Int32>, String, String)

ObjectResult建立產生回應的 ProblemDetails

(繼承來源 ControllerBase)
Redirect(String)

建立 RedirectResult 物件,將 () Status302Found 重新導向至指定的 url

(繼承來源 ControllerBase)
RedirectPermanent(String)

RedirectResult使用指定的 url 建立物件 Permanent ,並將 Status301MovedPermanently 設定為 true () 。

(繼承來源 ControllerBase)
RedirectPermanentPreserveMethod(String)

RedirectResult使用指定的 url 建立物件, Permanent 並將 設定為 true,並將 PreserveMethod 設定為 true (Status308PermanentRedirect) 。

(繼承來源 ControllerBase)
RedirectPreserveMethod(String)

RedirectResult使用指定的 url 建立物件, Permanent 並將 設定為 false,並將 PreserveMethod 設定為 true (Status307TemporaryRedirect) 。

(繼承來源 ControllerBase)
RedirectToAction()

將 (Status302Found) 重新導向至與目前動作同名的動作。 'controller' 和 'action' 名稱是從目前要求的環境值擷取。

(繼承來源 ControllerBase)
RedirectToAction(String)

使用 actionName 將 () Status302Found 重新導向至指定的動作。

(繼承來源 ControllerBase)
RedirectToAction(String, Object)

使用 actionNamerouteValues 將 () Status302Found 重新導向至指定的動作。

(繼承來源 ControllerBase)
RedirectToAction(String, String)

使用 actionNamecontrollerName ,將 (Status302Found) 重新導向至指定的動作。

(繼承來源 ControllerBase)
RedirectToAction(String, String, Object)

使用指定的 、 controllerNamerouteValues ,將 (Status302Found) 重新導向至指定的 actionName 動作。

(繼承來源 ControllerBase)
RedirectToAction(String, String, Object, String)

使用指定的 、 、 和 ,將 (Status302Found) 重新導向至指定的 actionName 動作。 fragmentrouteValuescontrollerName

(繼承來源 ControllerBase)
RedirectToAction(String, String, String)

使用指定的 、 controllerNamefragment ,將 (Status302Found) 重新導向至指定的 actionName 動作。

(繼承來源 ControllerBase)
RedirectToActionPermanent(String)

使用指定的 actionName ,將 (Status301MovedPermanently) 重新導向至指定的動作,並將 Permanent 設定為 true。

(繼承來源 ControllerBase)
RedirectToActionPermanent(String, Object)

使用指定的 和 routeValues ,將 (Status301MovedPermanently) 重新導向至設定為 true 的指定 actionName 動作 Permanent

(繼承來源 ControllerBase)
RedirectToActionPermanent(String, String)

使用指定的 和 controllerName ,將 (Status301MovedPermanently) 重新導向至設定為 true 的指定 actionName 動作 Permanent

(繼承來源 ControllerBase)
RedirectToActionPermanent(String, String, Object)

使用指定的 、 controllerNamerouteValues ,將 (Status301MovedPermanently) 重新導向至設定為 true 的指定 actionName 動作 Permanent

(繼承來源 ControllerBase)
RedirectToActionPermanent(String, String, Object, String)

使用指定的 、 、 和 ,將 (Status301MovedPermanently) 重新導向至指定的動作,並將 fragmentPermanent 設定為 true。 routeValuescontrollerNameactionName

(繼承來源 ControllerBase)
RedirectToActionPermanent(String, String, String)

使用指定的 、 controllerNamefragment ,將 (Status301MovedPermanently) 重新導向至設定為 true 的指定 actionName 動作 Permanent

(繼承來源 ControllerBase)
RedirectToActionPermanentPreserveMethod(String, String, Object, String)

使用指定的 、 、 和 ,將 (Status308PermanentRedirect) 重新導向至指定的動作 Permanent ,並將 PreserveMethod 設定為 true。 fragmentrouteValuescontrollerNameactionName

(繼承來源 ControllerBase)
RedirectToActionPreserveMethod(String, String, Object, String)

使用指定的 、 、 和 ,將 () Status307TemporaryRedirect 重新導向至指定的動作 Permanent ,並將 PreserveMethod 設定為 false 並 fragment 設定為 true。 routeValuescontrollerNameactionName

(繼承來源 ControllerBase)
RedirectToPage(String)

將 (Status302Found) 重新導向至指定的 pageName

(繼承來源 ControllerBase)
RedirectToPage(String, Object)

使用指定的 ,將 () Status302Found 重新導向至指定的 pageNamerouteValues

(繼承來源 ControllerBase)
RedirectToPage(String, String)

使用指定的 ,將 () Status302Found 重新導向至指定的 pageNamepageHandler

(繼承來源 ControllerBase)
RedirectToPage(String, String, Object)

將 (Status302Found) 重新導向至指定的 pageName

(繼承來源 ControllerBase)
RedirectToPage(String, String, Object, String)

使用指定的 和 ,將 (Status302Found) 重新導向至指定的 pageNamerouteValuesfragment

(繼承來源 ControllerBase)
RedirectToPage(String, String, String)

使用指定的 ,將 () Status302Found 重新導向至指定的 pageNamefragment

(繼承來源 ControllerBase)
RedirectToPagePermanent(String)

將 (Status301MovedPermanently) 重新導向至指定的 pageName

(繼承來源 ControllerBase)
RedirectToPagePermanent(String, Object)

使用指定的 ,將 () Status301MovedPermanently 重新導向至指定的 pageNamerouteValues

(繼承來源 ControllerBase)
RedirectToPagePermanent(String, String)

使用指定的 ,將 () Status301MovedPermanently 重新導向至指定的 pageNamepageHandler

(繼承來源 ControllerBase)
RedirectToPagePermanent(String, String, Object, String)

使用指定的 和 ,將 (Status301MovedPermanently) 重新導向至指定的 pageNamerouteValuesfragment

(繼承來源 ControllerBase)
RedirectToPagePermanent(String, String, String)

使用指定的 ,將 () Status301MovedPermanently 重新導向至指定的 pageNamefragment

(繼承來源 ControllerBase)
RedirectToPagePermanentPreserveMethod(String, String, Object, String)

使用指定的 pageNamerouteValues 和 ,將 () Status308PermanentRedirect 重新導向至指定的路由 Permanent ,並將 PreserveMethod 設定為 true。 fragment

(繼承來源 ControllerBase)
RedirectToPagePreserveMethod(String, String, Object, String)

使用指定的 、 和 ,將 () Status307TemporaryRedirect 重新導向至指定的頁面 Permanent ,並將 PreserveMethod 設定為 false 並 fragment 設定為 true。 routeValuespageName

(繼承來源 ControllerBase)
RedirectToRoute(Object)

使用指定的 ,將 () Status302Found 重新導向至指定的 routeValues 路由。

(繼承來源 ControllerBase)
RedirectToRoute(String)

使用指定的 ,將 () Status302Found 重新導向至指定的 routeName 路由。

(繼承來源 ControllerBase)
RedirectToRoute(String, Object)

使用指定的 和 routeValues ,將 (Status302Found) 重新導向至指定的 routeName 路由。

(繼承來源 ControllerBase)
RedirectToRoute(String, Object, String)

使用指定的 、 routeValuesfragment ,將 (Status302Found) 重新導向至指定的 routeName 路由。

(繼承來源 ControllerBase)
RedirectToRoute(String, String)

使用指定的 和 fragment ,將 (Status302Found) 重新導向至指定的 routeName 路由。

(繼承來源 ControllerBase)
RedirectToRoutePermanent(Object)

使用指定的 routeValues ,將 (Status301MovedPermanently) 重新導向至指定的路由,並將 Permanent 設定為 true。

(繼承來源 ControllerBase)
RedirectToRoutePermanent(String)

使用指定的 routeName ,將 (Status301MovedPermanently) 重新導向至指定的路由,並將 Permanent 設定為 true。

(繼承來源 ControllerBase)
RedirectToRoutePermanent(String, Object)

使用 Status301MovedPermanently 指定的 routeNamerouteValues ,將 () 重新導向至指定的路由,並將 Permanent 設定為 true。

(繼承來源 ControllerBase)
RedirectToRoutePermanent(String, Object, String)

使用指定的 routeName 、 和 ,將 () Status301MovedPermanently 重新導向至指定的路由,並將 Permanentfragment 設定為 routeValues true。

(繼承來源 ControllerBase)
RedirectToRoutePermanent(String, String)

使用 Status301MovedPermanently 指定的 routeNamefragment ,將 () 重新導向至指定的路由,並將 Permanent 設定為 true。

(繼承來源 ControllerBase)
RedirectToRoutePermanentPreserveMethod(String, Object, String)

使用指定的 routeNamerouteValues 和 ,將 () Status308PermanentRedirect 重新導向至指定的路由 Permanent ,並將 PreserveMethod 設定為 true。 fragment

(繼承來源 ControllerBase)
RedirectToRoutePreserveMethod(String, Object, String)

使用指定的 、 和 ,將 () Status307TemporaryRedirect 重新導向至指定的路由 Permanent ,並將 PreserveMethod 設定為 false 並 fragment 設定為 true。 routeValuesrouteName

(繼承來源 ControllerBase)
SignIn(ClaimsPrincipal)

建立 SignInResult

(繼承來源 ControllerBase)
SignIn(ClaimsPrincipal, AuthenticationProperties)

SignInResult使用 properties 建立 。

(繼承來源 ControllerBase)
SignIn(ClaimsPrincipal, AuthenticationProperties, String)

SignInResult使用指定的驗證配置和 properties 建立 。

(繼承來源 ControllerBase)
SignIn(ClaimsPrincipal, AuthenticationProperties, String)

SignInResult使用指定的驗證配置和 properties 建立 。

(繼承來源 ControllerBase)
SignIn(ClaimsPrincipal, String)

SignInResult使用指定的驗證配置建立 。

(繼承來源 ControllerBase)
SignOut()

建立 SignOutResult

(繼承來源 ControllerBase)
SignOut(AuthenticationProperties)

SignOutResult使用 properties 建立 。

(繼承來源 ControllerBase)
SignOut(AuthenticationProperties, String[])

SignOutResult使用指定的驗證配置和 properties 建立 。

(繼承來源 ControllerBase)
SignOut(AuthenticationProperties, String[])

SignOutResult使用指定的驗證配置和 properties 建立 。

(繼承來源 ControllerBase)
SignOut(String[])

SignOutResult使用指定的驗證配置建立 。

(繼承來源 ControllerBase)
StatusCode(Int32)

藉由指定 statusCode 來建立 StatusCodeResult 物件。

(繼承來源 ControllerBase)
StatusCode(Int32, Object)

藉由指定 statusCode 和 來建立 ObjectResult 物件value

(繼承來源 ControllerBase)
TryUpdateModelAsync(Object, Type, String)

使用來自控制器目前 IValueProviderprefix 的值,更新指定的 model 實例。

(繼承來源 ControllerBase)
TryUpdateModelAsync(Object, Type, String, IValueProvider, Func<ModelMetadata,Boolean>)

使用 valueProviderprefix 更新指定的 model 實例。

(繼承來源 ControllerBase)
TryUpdateModelAsync<TModel>(TModel)

使用來自控制器目前 IValueProvider 的值,更新指定的 model 實例。

(繼承來源 ControllerBase)
TryUpdateModelAsync<TModel>(TModel, String)

使用來自控制器目前 IValueProviderprefix 的值,更新指定的 model 實例。

(繼承來源 ControllerBase)
TryUpdateModelAsync<TModel>(TModel, String, Expression<Func<TModel,Object>>[])

使用來自控制器目前 IValueProviderprefix 的值,更新指定的 model 實例。

(繼承來源 ControllerBase)
TryUpdateModelAsync<TModel>(TModel, String, Func<ModelMetadata,Boolean>)

使用來自控制器目前 IValueProviderprefix 的值,更新指定的 model 實例。

(繼承來源 ControllerBase)
TryUpdateModelAsync<TModel>(TModel, String, IValueProvider)

使用 valueProviderprefix 更新指定的 model 實例。

(繼承來源 ControllerBase)
TryUpdateModelAsync<TModel>(TModel, String, IValueProvider, Expression<Func<TModel,Object>>[])

使用 valueProviderprefix 更新指定的 model 實例。

(繼承來源 ControllerBase)
TryUpdateModelAsync<TModel>(TModel, String, IValueProvider, Func<ModelMetadata,Boolean>)

使用 valueProviderprefix 更新指定的 model 實例。

(繼承來源 ControllerBase)
TryValidateModel(Object)

驗證指定的 model 實例。

(繼承來源 ControllerBase)
TryValidateModel(Object, String)

驗證指定的 model 實例。

(繼承來源 ControllerBase)
Unauthorized()

UnauthorizedResult建立會產生回應的 Status401Unauthorized

(繼承來源 ControllerBase)
Unauthorized(Object)

UnauthorizedObjectResult建立會產生回應的 Status401Unauthorized

(繼承來源 ControllerBase)
UnprocessableEntity()

UnprocessableEntityResult建立會產生回應的 Status422UnprocessableEntity

(繼承來源 ControllerBase)
UnprocessableEntity(ModelStateDictionary)

UnprocessableEntityObjectResult建立會產生回應的 Status422UnprocessableEntity

(繼承來源 ControllerBase)
UnprocessableEntity(Object)

UnprocessableEntityObjectResult建立會產生回應的 Status422UnprocessableEntity

(繼承來源 ControllerBase)
ValidationProblem()

ActionResult建立 ,其會產生 Status400BadRequest 來自 的驗證錯誤 ModelState 回應。

(繼承來源 ControllerBase)
ValidationProblem(ModelStateDictionary)

ActionResult建立 ,其會產生 Status400BadRequest 來自 的驗證錯誤 modelStateDictionary 回應。

(繼承來源 ControllerBase)
ValidationProblem(String, String, Nullable<Int32>, String, String, ModelStateDictionary)

ActionResult建立 ,其會產生 Status400BadRequest 具有 ValidationProblemDetails 值的回應。

(繼承來源 ControllerBase)
ValidationProblem(ValidationProblemDetails)

BadRequestObjectResult建立會產生回應的 Status400BadRequest

(繼承來源 ControllerBase)
View()

建立 ViewResult 物件,將檢視轉譯至回應。

View(Object)

ViewResult 由指定要 model 由檢視轉譯的 來建立 物件。

View(String)

藉由指定 viewName 來建立 ViewResult 物件。

View(String, Object)

ViewResult 由指定 viewNamemodel 要由檢視轉譯的 來建立 物件。

ViewComponent(String)

指定要 ViewComponentResult 轉譯的檢視元件名稱,以建立 。

ViewComponent(String, Object)

指定要 ViewComponentResult 轉譯的檢視元件名稱,以建立 。

ViewComponent(Type)

指定要 ViewComponentResultType 轉譯之檢視元件的 ,以建立 。

ViewComponent(Type, Object)

指定要 ViewComponentResultType 轉譯之檢視元件的 ,以建立 。

適用於