DataBindingHandlerAttribute.HandlerTypeName 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取数据绑定处理程序的类型名称。
public:
property System::String ^ HandlerTypeName { System::String ^ get(); };
public string HandlerTypeName { get; }
member this.HandlerTypeName : string
Public ReadOnly Property HandlerTypeName As String
属性值
处理程序的类型名称。 如果类型名称为 null
,则此属性返回空字符串 ("")。
示例
下面的代码示例从类的DataBindingHandlerAttribute实例中检索HandlerTypeName属性。
[
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