IAttributeAccessor.GetAttribute(String) Metódus
Definíció
Fontos
Egyes információk olyan, kiadás előtti termékekre vonatkoznak, amelyek a kiadásig még jelentősen módosulhatnak. A Microsoft nem vállal kifejezett vagy törvényi garanciát az itt megjelenő információért.
Amikor egy osztály implementálja, lekéri a megadott attribútumtulajdonságot a kiszolgálóvezérlőből.
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
Paraméterek
Válaszok
A megadott attribútum értéke.
Példák
Az alábbi példakód a metódus implementálását GetAttribute mutatja be.
// 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