IAttributeAccessor.GetAttribute(String) Método
Definição
Importante
Algumas informações dizem respeito a um produto pré-lançado que pode ser substancialmente modificado antes de ser lançado. A Microsoft não faz garantias, de forma expressa ou implícita, em relação à informação aqui apresentada.
Quando implementado por uma classe, recupera a propriedade de atributo especificada do controlo do servidor.
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
Parâmetros
Devoluções
O valor do atributo especificado.
Exemplos
O exemplo de código seguinte demonstra uma implementação do GetAttribute método.
// 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