HyperLinkDataBindingHandler Class
Provides a data-binding handler for a hyperlink property.
For a list of all members of this type, see HyperLinkDataBindingHandler Members.
System.Object
System.Web.UI.Design.DataBindingHandler
System.Web.UI.Design.HyperLinkDataBindingHandler
[Visual Basic] Public Class HyperLinkDataBindingHandler Inherits DataBindingHandler [C#] public class HyperLinkDataBindingHandler : DataBindingHandler [C++] public __gc class HyperLinkDataBindingHandler : public DataBindingHandler [JScript] 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.
Example
[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
in the upper-left corner of the page.
Requirements
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