HtmlTextWriter.GetAttributeName(HtmlTextWriterAttribute) Yöntem
Tanım
Önemli
Bazı bilgiler ürünün ön sürümüyle ilgilidir ve sürüm öncesinde önemli değişiklikler yapılmış olabilir. Burada verilen bilgilerle ilgili olarak Microsoft açık veya zımni hiçbir garanti vermez.
Belirtilen HtmlTextWriterAttribute değerle ilişkili işaretleme özniteliğinin adını alır.
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
Parametreler
- attrKey
- HtmlTextWriterAttribute
HtmlTextWriterAttribute için işaretleme özniteliği adını almak için.
Döndürülenler
İşaretleme özniteliğinin adını içeren bir dize.
Örnekler
Aşağıdaki kod örneği, bir GetAttributeName numaralandırma değerini dize adına dönüştürmek için yönteminin nasıl kullanılacağını Size gösterir.
// 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))
Açıklamalar
GetAttributeName yöntemi, geçerli attrKey bir değer değilse HtmlTextWriterAttribute boş bir dize ("") döndürür.