IAttributeAccessor.GetAttribute(String) Methode

Definitie

Wanneer deze wordt geïmplementeerd door een klasse, haalt u de opgegeven kenmerkeigenschap op uit het serverbesturingselement.

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

Parameters

key
String

Een String die de naam van het serverbeheerkenmerk vertegenwoordigt.

Retouren

De waarde van het opgegeven kenmerk.

Voorbeelden

In het volgende codevoorbeeld ziet u een implementatie van de GetAttribute methode.

// 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

Van toepassing op