ViewComponentResult ViewComponentResult ViewComponentResult ViewComponentResult Class


An IActionResult which renders a view component to the response.

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


ViewComponentResult() ViewComponentResult() ViewComponentResult() ViewComponentResult()


Arguments Arguments Arguments Arguments

Gets or sets the arguments provided to the view component.

ContentType ContentType ContentType ContentType

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

Model Model Model Model

Get the view data model.

StatusCode StatusCode StatusCode StatusCode

Gets or sets the HTTP status code.

TempData TempData TempData TempData

Gets or sets the ITempDataDictionary for this result.

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

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

ViewData ViewData ViewData ViewData

Gets or sets the ViewDataDictionary for this result.

ViewEngine 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.


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

Applies to