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입니다.

반환

String

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

예제

다음 코드 예제에서는 열거형 값을 해당 문자열 이름으로 변환 Size 하는 메서드를 사용 GetAttributeName 하는 방법을 보여 있습니다.

// 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 유효한 HtmlTextWriterAttribute 값이 아니면 attrKey 빈 문자열("")을 반환합니다.

적용 대상

추가 정보