HyperLinkDesigner Class
Assembly: System.Design (in system.design.dll)
The HyperLink control creates a link for the client browser to navigate to another Web page.
In a visual designer, when you switch from Source to Design view, the markup source code that describes a HyperLink control is parsed and a design-time version of the control is created on the design surface. When you switch back to Source view, the design-time control is persisted to the markup source code and edited into the markup for the Web page. The HyperLinkDesigner class provides design-time support for the HyperLink control.
The GetDesignTimeHtml method returns the markup that is used to render the associated HyperLink control at design time. The OnComponentChanged method is called when there is a change to the associated control.
This section contains two code examples. The first one demonstrates how to derive a class from the HyperLinkDesigner class, override a method, and supply a property value. The second one demonstrates how to derive a control from the HyperLink control and apply an attribute on the derived control.
The following code example shows how to derive a CustomHyperLinkDesigner class from the HyperLinkDesigner class. It overrides the GetDesignTimeHtml method to supply a default value for the Text property if the original value for the Text is an empty string (""). This ensures that the associated control will be visible at design time.
The following code example shows how to derive the CustomHyperLink control from the HyperLink control and apply a DesignerAttribute attribute on the CustomHyperLink control to associate it with the CustomHyperLinkDesigner.
- SecurityPermission for calling unmanaged code. Demand value: Demand. Permission value: UnmanagedCode
System.ComponentModel.Design.ComponentDesigner
System.Web.UI.Design.HtmlControlDesigner
System.Web.UI.Design.ControlDesigner
System.Web.UI.Design.TextControlDesigner
System.Web.UI.Design.WebControls.HyperLinkDesigner
Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.