Class SitecoreComponentViewComponent
Version: 21.x
Default view with model binding to render components.
Inheritance
System.Object
SitecoreComponentViewComponent
Inherited Members
BindingViewComponent.BindView
BindingViewComponent.BindView
BindingViewComponent.BindView
BindingViewComponent.BindView
BindingViewComponent.BindView(Type, String)
Namespace: Sitecore.AspNet.RenderingEngine.ViewComponents
Assembly: Sitecore.AspNet.RenderingEngine.dll
Syntax
Constructors
SitecoreComponentViewComponent(IViewModelBinder)
Initializes a new instance of the SitecoreComponentViewComponent class.
Declaration
Parameters
| Type | Name | Description |
|---|---|---|
| IViewModelBinder | binder | The IViewModelBinder to use when binding the model to the view component. |
Methods
InvokeAsync(Type, String)
Executes the view component.
Declaration
Parameters
| Type | Name | Description |
|---|---|---|
| System.Type | modelType | The type of the model to use when generating the view component output. |
| System.String | viewName | The name of the view to use when generating the view component output. |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task < Microsoft.AspNetCore.Mvc.IViewComponentResult > | A System.Threading.Tasks.Task<> representing the result of the asynchronous operation. |
If you have suggestions for improving this article, let us know!