Share via


HtmlTargetElementAttribute Class

Definition

Provides an ITagHelper's target.

public ref class HtmlTargetElementAttribute sealed : Attribute
[System.AttributeUsage(System.AttributeTargets.Class, AllowMultiple=true, Inherited=false)]
public sealed class HtmlTargetElementAttribute : Attribute
[<System.AttributeUsage(System.AttributeTargets.Class, AllowMultiple=true, Inherited=false)>]
type HtmlTargetElementAttribute = class
    inherit Attribute
Public NotInheritable Class HtmlTargetElementAttribute
Inherits Attribute
Inheritance
HtmlTargetElementAttribute
Attributes

Constructors

HtmlTargetElementAttribute()

Instantiates a new instance of the HtmlTargetElementAttribute class that targets all HTML elements with the required Attributes.

HtmlTargetElementAttribute(String)

Instantiates a new instance of the HtmlTargetElementAttribute class with the given tag as its Tag value.

Fields

ElementCatchAllTarget

The value for a tag helper that targets all HTML elements.

Properties

Attributes

A comma-separated String of attribute selectors the HTML element must match for the ITagHelper to run. * at the end of an attribute name acts as a prefix match. A value surrounded by square brackets is handled as a CSS attribute value selector. Operators ^=, $= and = are supported e.g. "name", "[name]", "[name=value]", "[ name ^= 'value' ]".

ParentTag

The required HTML element name of the direct parent. A null value indicates any HTML element name is allowed.

Tag

The HTML tag the ITagHelper targets. A * value indicates this ITagHelper targets all HTML elements with the required Attributes.

TagStructure

The expected tag structure. Defaults to Unspecified.

Applies to