IAttributeAccessor.GetAttribute(String) 메서드

정의

클래스에서 구현될 때, 서버 컨트롤에서 지정된 특성 속성을 검색합니다.

public:
 System::String ^ GetAttribute(System::String ^ key);
public string GetAttribute (string key);
abstract member GetAttribute : string -> string
Public Function GetAttribute (key As String) As String

매개 변수

key
String

서버 컨트롤 특성의 이름을 나타내는 String입니다.

반환

String

지정된 특성의 값을 반환합니다.

예제

다음 코드 예제에서는의 구현을 보여 줍니다는 GetAttribute 메서드.

// Implement the GetAttribute method for the control. When
// this method is called from a page, the values for the control's
// properties can be displayed in the page.
public String GetAttribute(String name)
{
   return (String)ViewState[name];
}
' Implement the GetAttribute method for the control. When
' this method is called from a page, the values for the control's
' properties can be displayed in the page.
Public Function GetAttribute(name As String) As String Implements IAttributeAccessor.GetAttribute
   Return CType(ViewState(name), String)
End Function 'GetAttribute

적용 대상