HtmlTextWriter.GetAttributeName(HtmlTextWriterAttribute) 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.
Obtient le nom de l’attribut de balisage associé à la valeur spécifiée HtmlTextWriterAttribute .
protected:
System::String ^ GetAttributeName(System::Web::UI::HtmlTextWriterAttribute attrKey);
protected string GetAttributeName(System.Web.UI.HtmlTextWriterAttribute attrKey);
member this.GetAttributeName : System.Web.UI.HtmlTextWriterAttribute -> string
Protected Function GetAttributeName (attrKey As HtmlTextWriterAttribute) As String
Paramètres
- attrKey
- HtmlTextWriterAttribute
Pour HtmlTextWriterAttribute obtenir le nom de l’attribut de balisage.
Retours
Chaîne contenant le nom de l’attribut de balisage.
Exemples
L’exemple de code suivant montre comment utiliser la GetAttributeName méthode pour convertir une Size valeur d’énumération en son nom de chaîne.
// Use the GetAttributeName method to associate
// the Size attribute with its HtmlTextWriteAttribute
// enumeration value in a Write method call.
Write( GetAttributeName( HtmlTextWriterAttribute::Size ) );
// Use the GetAttributeName method to associate
// the Size attribute with its HtmlTextWriteAttribute
// enumeration value in a Write method call.
Write(GetAttributeName(HtmlTextWriterAttribute.Size));
' Use the GetAttributeName method to associate
' the Size attribute with its HtmlTextWriteAttribute
' enumeration value in a Write method call.
writer.Write(GetAttributeName(HtmlTextWriterAttribute.Size))
Remarques
La GetAttributeName méthode retourne une chaîne vide (« »), si attrKey elle n’est pas une valeur valide HtmlTextWriterAttribute .