HtmlTextWriter.GetAttributeName(HtmlTextWriterAttribute) 메서드

정의

지정된 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

매개 변수

attrKey
HtmlTextWriterAttribute

HtmlTextWriterAttribute 태그 특성 이름을 가져올 대상입니다.

반품

태그 특성의 이름을 포함하는 문자열입니다.

예제

다음 코드 예제에서는 열거형 값을 해당 문자열 이름으로 변환 GetAttributeName 하는 메서드를 사용 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.
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))

설명

메서드는 GetAttributeName 유효한 attrKey 값이 아니면 빈 문자열("")HtmlTextWriterAttribute을 반환합니다.

적용 대상

추가 정보