HtmlTextWriter.GetAttributeName(HtmlTextWriterAttribute) Metodo
Definizione
Importante
Alcune informazioni sono relative alla release non definitiva del prodotto, che potrebbe subire modifiche significative prima della release definitiva. Microsoft non riconosce alcuna garanzia, espressa o implicita, in merito alle informazioni qui fornite.
Ottiene il nome dell'attributo di markup associato al valore specificato 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
Parametri
- attrKey
- HtmlTextWriterAttribute
Oggetto HtmlTextWriterAttribute per cui ottenere il nome dell'attributo di markup.
Valori restituiti
Stringa contenente il nome dell'attributo di markup.
Esempio
Nell'esempio di codice seguente viene illustrato come utilizzare il GetAttributeName metodo per convertire un Size valore di enumerazione nel nome della stringa.
// 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))
Commenti
Il GetAttributeName metodo restituisce una stringa vuota (""), se attrKey non è un valore valido HtmlTextWriterAttribute .