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

서버 컨트롤 특성의 이름을 나타내는 A 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

적용 대상