Controller.ViewComponent Controller.ViewComponent Controller.ViewComponent Method

Definition

Overloads

ViewComponent(Type, Object) ViewComponent(Type, Object) ViewComponent(Type, Object)

Creates a ViewComponentResult by specifying the Type of a view component to render.

ViewComponent(String) ViewComponent(String) ViewComponent(String)

Creates a ViewComponentResult by specifying the name of a view component to render.

ViewComponent(Type) ViewComponent(Type) ViewComponent(Type)

Creates a ViewComponentResult by specifying the Type of a view component to render.

ViewComponent(String, Object) ViewComponent(String, Object) ViewComponent(String, Object)

Creates a ViewComponentResult by specifying the name of a view component to render.

ViewComponent(Type, Object) ViewComponent(Type, Object) ViewComponent(Type, Object)

Creates a ViewComponentResult by specifying the Type of a view component to render.

[Microsoft.AspNetCore.Mvc.NonAction]
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

componentType
Type Type Type

The view component Type.

arguments
Object Object 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

ViewComponent(String) ViewComponent(String) ViewComponent(String)

Creates a ViewComponentResult by specifying the name of a view component to render.

[Microsoft.AspNetCore.Mvc.NonAction]
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

componentName
String String String

The view component name. Can be a view component ShortName or FullName.

Returns

ViewComponent(Type) ViewComponent(Type) ViewComponent(Type)

Creates a ViewComponentResult by specifying the Type of a view component to render.

[Microsoft.AspNetCore.Mvc.NonAction]
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

componentType
Type Type Type

The view component Type.

Returns

ViewComponent(String, Object) ViewComponent(String, Object) ViewComponent(String, Object)

Creates a ViewComponentResult by specifying the name of a view component to render.

[Microsoft.AspNetCore.Mvc.NonAction]
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

componentName
String String String

The view component name. Can be a view component ShortName or FullName.

arguments
Object Object 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

Applies to