Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

DataBindingHandler Class

Provides a base class for a data-binding handler.

Namespace:  System.Web.UI.Design
Assembly:  System.Design (in System.Design.dll)
[SecurityPermissionAttribute(SecurityAction.Demand, Flags = SecurityPermissionFlag.UnmanagedCode)]
public abstract class DataBindingHandler

The DataBindingHandler type exposes the following members.

  NameDescription
Protected methodDataBindingHandlerInitializes a new instance of the DataBindingHandler class.
Top
  NameDescription
Public methodDataBindControlBinds the specified control.
Public methodEquals(Object)Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetHashCodeServes as the default hash function. (Inherited from Object.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Top

DataBindingHandler provides a base class for data-binding handlers. A data-binding handler can be used within a designer to perform data-binding to enable a meaningful display of the control on the design surface. Typically a control's designer is responsible for this functionality. However, when a control is not live on the design surface, such as within the template of another control, it does not have a designer, and this functionality is provided by a data-binding handler if one has been specified with a DataBindingHandlerAttribute in the code for the control.

To use a data-binding handler, the control which has the data-bound property or properties must have a DataBindingHandlerAttribute specified within its code that indicates the type of data-binding handler to use.

For example, the Label control is associated with the TextDataBindingHandler class through a DataBindingHandlerAttribute in the code for the Label class. Within a template for a DataList, a Label control whose text property has been data bound displays the word "DataBound" on the label. Without the data-binding handler, the label would be invisible at design-time, as it does not have a designer to bind its data-bound properties while in a templated control at design-time.

To implement a data-binding handler, define a new class that derives from this class and implement the DataBindControl method to set the appropriate properties.

.NET Framework

Supported in: 4.5.1, 4.5, 4, 3.5, 3.0, 2.0, 1.1, 1.0

Windows Phone 8.1, Windows Phone 8, Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.