Controller.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:
- Controller.cs
- Source:
- Controller.cs
- Source:
- Controller.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);
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.ViewComponentResult ViewComponent (Type componentType, object arguments);
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.ViewComponentResult ViewComponent (Type componentType, object? arguments);
[<Microsoft.AspNetCore.Mvc.NonAction>]
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.
- Attributes
Applies to
ViewComponent(String)
- Source:
- Controller.cs
- Source:
- Controller.cs
- Source:
- Controller.cs
Creates a ViewComponentResult by specifying the name of a view component to render.
public:
virtual Microsoft::AspNetCore::Mvc::ViewComponentResult ^ ViewComponent(System::String ^ componentName);
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.ViewComponentResult ViewComponent (string componentName);
[<Microsoft.AspNetCore.Mvc.NonAction>]
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.
- Attributes
Applies to
ViewComponent(Type)
- Source:
- Controller.cs
- Source:
- Controller.cs
- Source:
- Controller.cs
Creates a ViewComponentResult by specifying the Type of a view component to render.
public:
virtual Microsoft::AspNetCore::Mvc::ViewComponentResult ^ ViewComponent(Type ^ componentType);
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.ViewComponentResult ViewComponent (Type componentType);
[<Microsoft.AspNetCore.Mvc.NonAction>]
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.
- Attributes
Applies to
ViewComponent(String, Object)
- Source:
- Controller.cs
- Source:
- Controller.cs
- Source:
- Controller.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);
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.ViewComponentResult ViewComponent (string componentName, object arguments);
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.ViewComponentResult ViewComponent (string componentName, object? arguments);
[<Microsoft.AspNetCore.Mvc.NonAction>]
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.
- Attributes