DataBindingHandlerAttribute.HandlerTypeName Propiedad

Definición

Obtiene el nombre de tipo del controlador de enlace de datos.

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

Valor de propiedad

Nombre de tipo del controlador. Si el nombre de tipo es null, esta propiedad devuelve una cadena vacía ("").

Ejemplos

En el ejemplo de código siguiente se recupera la HandlerTypeName propiedad de una instancia de la DataBindingHandlerAttribute clase .

[
  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

Se aplica a