This documentation is archived and is not being maintained.

HyperLinkDataBindingHandler Class

Provides a data-binding handler for a hyperlink property.

For a list of all members of this type, see HyperLinkDataBindingHandler Members.


[Visual Basic]
Public Class HyperLinkDataBindingHandler
   Inherits DataBindingHandler
public class HyperLinkDataBindingHandler : DataBindingHandler
public __gc class HyperLinkDataBindingHandler : public
public class HyperLinkDataBindingHandler extends DataBindingHandler

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.


[Visual Basic] The following code example creates a class, named CustomHyperLinkDataBindingHandler, that derives from the HyperLinkDataBindingHandler class. It resolves design-time data binding for the CustomHyperLink class using the System.Web.UI.WebControls.HyperLinkDataBindingHandler.DataBindControl method.

[Visual Basic] 
' Create a class that derives from the 
' HyperLinkDataBindingHandler class. This
' will resolve data binding for the CustomHyperlink
' class at design time.
 Public Class CustomHyperLinkDataBindingHandler
   Inherits HyperLinkDataBindingHandler
   ' Override the DataBindControl method to set property
   ' values in the control's DataBindingCollection object
   ' at design time.
    Public Overrides Sub DataBindControl(designerHost As IDesignerHost, control As Control)
      Dim bindings As DataBindingCollection = CType(control, IDataBindingsAccessor).DataBindings
      Dim imageBinding As DataBinding = bindings("ImageUrl")
      If Not (imageBinding Is Nothing) Then
         Dim hLink As CustomHyperLink = CType(control, CustomHyperLink)         
         hLink.ImageUrl = "Image Url."
      End If
      MyBase.DataBindControl(designerHost, control)
    End Sub 
 End Class 

[C#, C++, JScript] No example is available for C#, C++, or JScript. To view a Visual Basic example, click the Language Filter button Language Filter in the upper-left corner of the page.


Namespace: System.Web.UI.Design

Platforms: Windows 2000, Windows XP Professional, Windows Server 2003 family

Assembly: System.Design (in System.Design.dll)

See Also

HyperLinkDataBindingHandler Members | System.Web.UI.Design Namespace