ViewComponentResult Class

Definition

An IActionResult which renders a view component to the response.

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
Inheritance
ViewComponentResult
Implements

Constructors

ViewComponentResult()

Properties

Arguments

Gets or sets the arguments provided to the view component.

ContentType

Gets or sets the Content-Type header for the response.

Model

Get the view data model.

StatusCode

Gets or sets the HTTP status code.

TempData

Gets or sets the ITempDataDictionary for this result.

ViewComponentName

Gets or sets the name of the view component to invoke. Will be ignored if ViewComponentType is set to a non-null value.

ViewComponentType

Gets or sets the type of the view component to invoke.

ViewData

Gets or sets the ViewDataDictionary for this result.

ViewEngine
Obsolete.

This property is unused and will be removed in the next major version.

Gets or sets the IViewEngine used to locate views.

Methods

ExecuteResult(ActionContext)

Executes the result operation of the action method synchronously. This method is called by MVC to process the result of an action method.

(Inherited from ActionResult)
ExecuteResultAsync(ActionContext)

Executes the result operation of the action method asynchronously. This method is called by MVC to process the result of an action method.

Applies to