DataBindingHandlerAttribute.HandlerTypeName Propriedade

Definição

Obtém o nome do tipo do manipulador de associação de dados.

public:
 property System::String ^ HandlerTypeName { System::String ^ get(); };
public string HandlerTypeName { get; }
member this.HandlerTypeName : string
Public ReadOnly Property HandlerTypeName As String

Valor da propriedade

String

O nome do tipo do manipulador. Se o nome do tipo for null, essa propriedade retornará uma cadeia de caracteres vazia ("").

Exemplos

O exemplo de código a seguir recupera a HandlerTypeName propriedade de uma instância da DataBindingHandlerAttribute classe.

[
  DataBindingHandlerAttribute(typeof(System.Web.UI.Design.TextDataBindingHandler))
]
public class SimpleWebControl:WebControl
{
   // Insert code for class members here
}

class TestAttributes
{
   public static void Main()
   {
      System.ComponentModel.AttributeCollection myAttributes = 
         TypeDescriptor.GetAttributes(typeof(SimpleWebControl));

      DataBindingHandlerAttribute myDataBindingHandlerAttribute = 
         myAttributes[typeof(DataBindingHandlerAttribute)] as DataBindingHandlerAttribute;

      if(myDataBindingHandlerAttribute != null)
      {
         Console.Write("DataBindingHandlerAttribute's HandlerTypeName is : " + 
               myDataBindingHandlerAttribute.HandlerTypeName);
      }
   }
}
<DataBindingHandlerAttribute(GetType(System.Web.UI.Design.TextDataBindingHandler))>  _
Public Class SimpleWebControl
   Inherits WebControl
   ' Insert code for class members here
End Class

Class TestAttributes
   
   Public Shared Sub Main()
      Dim myAttributes As System.ComponentModel.AttributeCollection = _
         TypeDescriptor.GetAttributes(GetType(SimpleWebControl))
      
      Dim myDataBindingHandlerAttribute As DataBindingHandlerAttribute = _
         myAttributes(GetType(DataBindingHandlerAttribute))
      
      If Not (myDataBindingHandlerAttribute Is Nothing) Then
         Console.Write(("DataBindingHandlerAttribute's HandlerTypeName is : " + _
            myDataBindingHandlerAttribute.HandlerTypeName))
      End If
   End Sub
End Class

Aplica-se a