ViewComponentResult ViewComponentResult ViewComponentResult Class

Definition

An IActionResult which renders a view component to the response.

public class ViewComponentResult : Microsoft.AspNetCore.Mvc.ActionResult, Microsoft.AspNetCore.Mvc.IActionResult, Microsoft.AspNetCore.Mvc.Infrastructure.IStatusCodeActionResult
type ViewComponentResult = class
    inherit ActionResult
    interface IStatusCodeActionResult
    interface IActionResult
Public Class ViewComponentResult
Inherits ActionResult
Implements IActionResult, IStatusCodeActionResult
Inheritance
ViewComponentResultViewComponentResultViewComponentResult
Implements

Constructors

ViewComponentResult() ViewComponentResult() ViewComponentResult()

Properties

Arguments Arguments Arguments

Gets or sets the arguments provided to the view component.

ContentType ContentType ContentType

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

Model Model Model

Get the view data model.

StatusCode StatusCode StatusCode

Gets or sets the HTTP status code.

TempData TempData TempData

Gets or sets the ITempDataDictionary for this result.

ViewComponentName ViewComponentName 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 ViewComponentType ViewComponentType

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

ViewData ViewData ViewData

Gets or sets the ViewDataDictionary for this result.

ViewEngine ViewEngine ViewEngine

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) ExecuteResult(ActionContext) 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) ExecuteResultAsync(ActionContext) ExecuteResultAsync(ActionContext)

Applies to