ViewComponentContextAttribute Class

Specifies that a controller property should be set with the current Microsoft.AspNetCore.Mvc.ViewComponents.ViewComponentContext when creating the view component. The property must have a public set method.

Namespace
Microsoft.AspNetCore.Mvc.ViewComponents
Assemblies
  • Microsoft.AspNetCore.Mvc.ViewFeatures

Syntax

[AttributeUsage(AttributeTargets.Property, AllowMultiple = false, Inherited = true)]
public class ViewComponentContextAttribute : Attribute, _Attribute
class Microsoft.AspNetCore.Mvc.ViewComponents.ViewComponentContextAttribute