Share via


HtmlTargetElementAttribute 类

定义

ITagHelper提供 的目标。

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
继承
HtmlTargetElementAttribute
属性

构造函数

HtmlTargetElementAttribute()

实例化 类的新实例, HtmlTargetElementAttribute 该实例面向具有所需 Attributes的所有 HTML 元素。

HtmlTargetElementAttribute(String)

使用给定 tagHtmlTargetElementAttribute 作为其Tag值实例化 类的新实例。

字段

ElementCatchAllTarget

面向所有 HTML 元素的标记帮助程序的值。

属性

Attributes

HTML 元素必须匹配的属性选择器的逗号分隔 String ,才能 ITagHelper 运行。 * 属性名称末尾充当前缀匹配项。 用方括号括起来的值作为 CSS 属性值选择器处理。 支持运算符 ^=$== ,例如 "name"、、"[name]""[name=value]""[ name ^= 'value' ]"

ParentTag

直接父级所需的 HTML 元素名称。 值 null 指示允许任何 HTML 元素名称。

Tag

目标的 HTML 标记 ITagHelper 。 值 * 指示此 ITagHelper 面向具有所需 Attributes的所有 HTML 元素。

TagStructure

预期的标记结构。 默认为 Unspecified

适用于