TagHelperOutputExtensions.CopyHtmlAttribute Méthode
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
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 à
Commentaires
https://aka.ms/ContentUserFeedback.
Bientôt disponible : Tout au long de 2024, nous allons supprimer progressivement GitHub Issues comme mécanisme de commentaires pour le contenu et le remplacer par un nouveau système de commentaires. Pour plus d’informations, consultezEnvoyer et afficher des commentaires pour