HtmlTextWriter.GetAttributeName(HtmlTextWriterAttribute) 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.
Obtém o nome do atributo de marcação associado ao valor especificado HtmlTextWriterAttribute .
protected:
System::String ^ GetAttributeName(System::Web::UI::HtmlTextWriterAttribute attrKey);
protected string GetAttributeName(System.Web.UI.HtmlTextWriterAttribute attrKey);
member this.GetAttributeName : System.Web.UI.HtmlTextWriterAttribute -> string
Protected Function GetAttributeName (attrKey As HtmlTextWriterAttribute) As String
Parâmetros
- attrKey
- HtmlTextWriterAttribute
Para HtmlTextWriterAttribute obter o nome do atributo de marcação para.
Devoluções
Uma cadeia contendo o nome do atributo de marcação.
Exemplos
O exemplo de código seguinte mostra como usar o GetAttributeName método para converter um Size valor de enumeração para o nome da sua cadeia.
// Use the GetAttributeName method to associate
// the Size attribute with its HtmlTextWriteAttribute
// enumeration value in a Write method call.
Write( GetAttributeName( HtmlTextWriterAttribute::Size ) );
// Use the GetAttributeName method to associate
// the Size attribute with its HtmlTextWriteAttribute
// enumeration value in a Write method call.
Write(GetAttributeName(HtmlTextWriterAttribute.Size));
' Use the GetAttributeName method to associate
' the Size attribute with its HtmlTextWriteAttribute
' enumeration value in a Write method call.
writer.Write(GetAttributeName(HtmlTextWriterAttribute.Size))
Observações
O GetAttributeName método devolve uma cadeia vazia (""), se attrKey não for um valor válido HtmlTextWriterAttribute .