HtmlTextWriter.GetAttributeName(HtmlTextWriterAttribute) Methode

Definitie

Hiermee haalt u de naam op van het kenmerk voor markeringen dat is gekoppeld aan de opgegeven HtmlTextWriterAttribute waarde.

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

Parameters

attrKey
HtmlTextWriterAttribute

De HtmlTextWriterAttribute naam van het kenmerk voor het ophalen van de markeringskenmerk.

Retouren

Een tekenreeks met de naam van het markeringskenmerk.

Voorbeelden

In het volgende codevoorbeeld ziet u hoe u de methode gebruikt om een GetAttributeName opsommingswaarde te converteren naar de Size naam van de tekenreeks.

// 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))

Opmerkingen

De GetAttributeName methode retourneert een lege tekenreeks (""), als attrKey dit geen geldige HtmlTextWriterAttribute waarde is.

Van toepassing op

Zie ook