ViewContextAttribute Class

Specifies that a tag helper property should be set with the current Microsoft.AspNetCore.Mvc.Rendering.ViewContext when creating the tag helper. The property must have a public set method.

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

Syntax

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