TagHelperOutputExtensions.CopyHtmlAttribute Méthode

Définition

Copie un attribut fourni par l’utilisateur de context's AllAttributes vers 's Attributes.tagHelperOutput

public:
[System::Runtime::CompilerServices::Extension]
 static void CopyHtmlAttribute(Microsoft::AspNetCore::Razor::TagHelpers::TagHelperOutput ^ tagHelperOutput, System::String ^ attributeName, Microsoft::AspNetCore::Razor::TagHelpers::TagHelperContext ^ context);
public static void CopyHtmlAttribute (this Microsoft.AspNetCore.Razor.TagHelpers.TagHelperOutput tagHelperOutput, string attributeName, Microsoft.AspNetCore.Razor.TagHelpers.TagHelperContext context);
static member CopyHtmlAttribute : Microsoft.AspNetCore.Razor.TagHelpers.TagHelperOutput * string * Microsoft.AspNetCore.Razor.TagHelpers.TagHelperContext -> unit
<Extension()>
Public Sub CopyHtmlAttribute (tagHelperOutput As TagHelperOutput, attributeName As String, context As TagHelperContext)

Paramètres

tagHelperOutput
TagHelperOutput

Cette TagHelperOutput méthode s’étend.

attributeName
String

Nom de l’attribut lié.

context
TagHelperContext

L’TagHelperContextopérateur

Remarques

Copie uniquement l’attribut si tagHelperOutput's Attributes ne contient pas d’attribut avec le donné attributeName.

Les attributs dupliqués de même nom dans context's AllAttributes ou tagHelperOutput's Attributes peuvent entraîner la non-maintenance de l’ordre des attributs copiés.

S’applique à