DataBindingHandlerAttribute Constructor (Type)
.NET Framework (current version)
Initializes a new instance of the DataBindingHandlerAttribute class of the specified Type.
Assembly: System.Web (in System.Web.dll)
The syntax for this attribute is:
[DataBindingHandlerAttribute (typeof(dataBindingHandlerType))]
The following code example defines a data-binding handler, named MyDataBindingHandler, to be used by the designer in editing mode. On exiting the editing mode, the Text property value is displayed.
Namespace CustomControls <DataBindingHandler(GetType(MyDataBindingHandler)), ToolboxData("<{0}:MyLabel runat=server></{0}:MyLabel>")> _ Public Class MyLabel Inherits Label Public Sub New() 'Insert your code here. End Sub 'NewNew End Class 'MyLabel Public Class MyDataBindingHandler Inherits DataBindingHandler Public Overrides Sub DataBindControl(host As IDesignerHost, control As Control) CType(control, Label).Text = "Added by data binding handler." End Sub 'DataBindControl End Class 'MyDataBindingHandler End Namespace 'CustomControls
.NET Framework
Available since 1.1
Available since 1.1
Show: