ViewComponentResult 類別

定義

IActionResult 會將檢視元件轉譯為回應。

public ref class ViewComponentResult : Microsoft::AspNetCore::Mvc::ActionResult
public ref class ViewComponentResult : Microsoft::AspNetCore::Mvc::ActionResult, Microsoft::AspNetCore::Mvc::IActionResult, Microsoft::AspNetCore::Mvc::Infrastructure::IStatusCodeActionResult
public class ViewComponentResult : Microsoft.AspNetCore.Mvc.ActionResult
public class ViewComponentResult : Microsoft.AspNetCore.Mvc.ActionResult, Microsoft.AspNetCore.Mvc.IActionResult, Microsoft.AspNetCore.Mvc.Infrastructure.IStatusCodeActionResult
type ViewComponentResult = class
    inherit ActionResult
type ViewComponentResult = class
    inherit ActionResult
    interface IStatusCodeActionResult
    interface IActionResult
type ViewComponentResult = class
    inherit ActionResult
    interface IActionResult
    interface IStatusCodeActionResult
Public Class ViewComponentResult
Inherits ActionResult
Public Class ViewComponentResult
Inherits ActionResult
Implements IActionResult, IStatusCodeActionResult
繼承
ViewComponentResult
實作

建構函式

ViewComponentResult()

IActionResult 會將檢視元件轉譯為回應。

屬性

Arguments

取得或設定提供給檢視元件的引數。

ContentType

取得或設定回應的 Content-Type 標頭。

Model

取得檢視資料模型。

StatusCode

取得或設定 HTTP 狀態碼。

TempData

取得或設定 ITempDataDictionary 這個結果的 。

ViewComponentName

取得或設定要叫用之檢視元件的名稱。 如果 ViewComponentType 設定為非 null 值,則會忽略 。

ViewComponentType

取得或設定要叫用之檢視元件的型別。

ViewData

取得或設定 ViewDataDictionary 這個結果的 。

ViewEngine
已淘汰.

此屬性未使用,將在下一個主要版本中移除。

取得或設定 IViewEngine 用來尋找檢視的 。

方法

ExecuteResult(ActionContext)

同步執行動作方法的結果作業。 MVC 會呼叫這個方法來處理動作方法的結果。

(繼承來源 ActionResult)
ExecuteResultAsync(ActionContext)

以非同步方式執行動作方法的結果作業。 MVC 會呼叫這個方法來處理動作方法的結果。

適用於