PageModel.ViewComponent Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
ViewComponent(Type, Object) |
Creates a ViewComponentResult by specifying the Type of a view component to render. |
ViewComponent(String) |
Creates a ViewComponentResult by specifying the name of a view component to render. |
ViewComponent(Type) |
Creates a ViewComponentResult by specifying the Type of a view component to render. |
ViewComponent(String, Object) |
Creates a ViewComponentResult by specifying the name of a view component to render. |
ViewComponent(Type, Object)
- Source:
- PageModel.cs
- Source:
- PageModel.cs
Creates a ViewComponentResult by specifying the Type of a view component to render.
public:
virtual Microsoft::AspNetCore::Mvc::ViewComponentResult ^ ViewComponent(Type ^ componentType, System::Object ^ arguments);
public virtual Microsoft.AspNetCore.Mvc.ViewComponentResult ViewComponent (Type componentType, object arguments);
public virtual Microsoft.AspNetCore.Mvc.ViewComponentResult ViewComponent (Type componentType, object? arguments);
abstract member ViewComponent : Type * obj -> Microsoft.AspNetCore.Mvc.ViewComponentResult
override this.ViewComponent : Type * obj -> Microsoft.AspNetCore.Mvc.ViewComponentResult
Public Overridable Function ViewComponent (componentType As Type, arguments As Object) As ViewComponentResult
Parameters
- arguments
- Object
An Object with properties representing arguments to be passed to the invoked view component method. Alternatively, an IDictionary<TKey,TValue> instance containing the invocation arguments.
Returns
The created ViewComponentResult object for the response.
Applies to
ViewComponent(String)
- Source:
- PageModel.cs
- Source:
- PageModel.cs
Creates a ViewComponentResult by specifying the name of a view component to render.
public:
virtual Microsoft::AspNetCore::Mvc::ViewComponentResult ^ ViewComponent(System::String ^ componentName);
public virtual Microsoft.AspNetCore.Mvc.ViewComponentResult ViewComponent (string componentName);
abstract member ViewComponent : string -> Microsoft.AspNetCore.Mvc.ViewComponentResult
override this.ViewComponent : string -> Microsoft.AspNetCore.Mvc.ViewComponentResult
Public Overridable Function ViewComponent (componentName As String) As ViewComponentResult
Parameters
Returns
The created ViewComponentResult object for the response.
Applies to
ViewComponent(Type)
- Source:
- PageModel.cs
- Source:
- PageModel.cs
Creates a ViewComponentResult by specifying the Type of a view component to render.
public:
virtual Microsoft::AspNetCore::Mvc::ViewComponentResult ^ ViewComponent(Type ^ componentType);
public virtual Microsoft.AspNetCore.Mvc.ViewComponentResult ViewComponent (Type componentType);
abstract member ViewComponent : Type -> Microsoft.AspNetCore.Mvc.ViewComponentResult
override this.ViewComponent : Type -> Microsoft.AspNetCore.Mvc.ViewComponentResult
Public Overridable Function ViewComponent (componentType As Type) As ViewComponentResult
Parameters
Returns
The created ViewComponentResult object for the response.
Applies to
ViewComponent(String, Object)
- Source:
- PageModel.cs
- Source:
- PageModel.cs
Creates a ViewComponentResult by specifying the name of a view component to render.
public:
virtual Microsoft::AspNetCore::Mvc::ViewComponentResult ^ ViewComponent(System::String ^ componentName, System::Object ^ arguments);
public virtual Microsoft.AspNetCore.Mvc.ViewComponentResult ViewComponent (string componentName, object arguments);
public virtual Microsoft.AspNetCore.Mvc.ViewComponentResult ViewComponent (string componentName, object? arguments);
abstract member ViewComponent : string * obj -> Microsoft.AspNetCore.Mvc.ViewComponentResult
override this.ViewComponent : string * obj -> Microsoft.AspNetCore.Mvc.ViewComponentResult
Public Overridable Function ViewComponent (componentName As String, arguments As Object) As ViewComponentResult
Parameters
- arguments
- Object
An Object with properties representing arguments to be passed to the invoked view component method. Alternatively, an IDictionary<TKey,TValue> instance containing the invocation arguments.
Returns
The created ViewComponentResult object for the response.