System.Web
1.0.5000.0
2.0.0.0
Gtk# is thread aware, but not thread safe; See the <link location="node:gtk-sharp/programming/threads">Gtk# Thread Programming</link> for details.
System.Web.UI.WebControls.WebControl
System.ComponentModel.Designer("System.Web.UI.Design.WebControls.HyperLinkDesigner, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.ComponentModel.Design.IDesigner")
System.ComponentModel.DefaultProperty("Text")
System.Web.UI.ToolboxData("<{0}:HyperLink runat="server">HyperLink</{0}:HyperLink>")
System.Web.UI.ParseChildren(false)
System.Web.UI.DataBindingHandler("System.Web.UI.Design.HyperLinkDataBindingHandler, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")
System.Web.UI.ControlBuilder(typeof(System.Web.UI.WebControls.HyperLinkControlBuilder))
In this topic:
-
Introduction
-
Accessibility
-
Declarative Syntax
Introduction
Use the control to create a link to another Web page. The control is typically displayed as text specified by the property. It can also be displayed as an image specified by the property.
If both the and properties are set, the property takes precedence. If the image is unavailable, the text in the property is displayed. In browsers that support ToolTip functionality, the property also becomes the ToolTip.
This control can be used to display user input, which might include malicious client script. Check any information that is sent from a client for executable script, SQL statements, or other code before displaying it in your application. ASP.NET provides an input request validation feature to block script and HTML in user input. Validation server controls are also provided to assess user input. For more information, see [<topic://cpconASPNETSyntaxForValidationControls>].
Accessibility
For information about how to configure this control so that it generates markup that conforms to accessibility standards, see Accessibility in Visual Studio 2010 and ASP.NET 4 and ASP.NET Controls and Accessibility.
Declarative Syntax
<asp:HyperLink
AccessKey="string"
BackColor="color name|#dddddd"
BorderColor="color name|#dddddd"
BorderStyle="NotSet|None|Dotted|Dashed|Solid|Double|Groove|Ridge|
Inset|Outset"
BorderWidth="size"
CssClass="string"
Enabled="True|False"
EnableTheming="True|False"
EnableViewState="True|False"
Font-Bold="True|False"
Font-Italic="True|False"
Font-Names="string"
Font-Overline="True|False"
Font-Size="string|Smaller|Larger|XX-Small|X-Small|Small|Medium|
Large|X-Large|XX-Large"
Font-Strikeout="True|False"
Font-Underline="True|False"
ForeColor="color name|#dddddd"
Height="size"
ID="string"
ImageUrl="uri"
NavigateUrl="uri"
OnDataBinding="DataBinding event handler"
OnDisposed="Disposed event handler"
OnInit="Init event handler"
OnLoad="Load event handler"
OnPreRender="PreRender event handler"
OnUnload="Unload event handler"
runat="server"
SkinID="string"
Style="string"
TabIndex="integer"
Target="string|_blank|_parent|_search|_self|_top"
Text="string"
ToolTip="string"
Visible="True|False"
Width="size"
/>
A control that displays a link to another Web page.
Constructor
Use this constructor to create and initialize a new instance of the control.
Initializes a new instance of the class.
1.0.5000.0
2.0.0.0
Method
System.Void
a
To be added
Adds the attributes of a control to the output stream for rendering.
1.0.5000.0
2.0.0.0
Method
System.Void
This method is used primarily by control developers, when deriving a custom control from the class.
If the input object is a , and the control has no child controls, then the input object is used to set the property of the control. Otherwise, the method of the base class is called and the specified object is added to the collection.
Notifies the control that an element was parsed, and adds the element to the control.
An that represents the parsed element.
1.0.5000.0
2.0.0.0
Property
System.String
Relative or full path location of the image currently displayed in the .
The control can be displayed as text or an image. Use the property to specify an image to display for the control.
If both the and properties are set, the property takes precedence. If the image is unavailable, the text in the property is displayed. In browsers that support ToolTip functionality, the property also becomes the ToolTip.
Gets or sets the path to an image to display for the control.
1.0.5000.0
2.0.0.0
System.Web.UI.UrlProperty
System.ComponentModel.Editor("System.Web.UI.Design.ImageUrlEditor, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof(System.Drawing.Design.UITypeEditor))
System.ComponentModel.DefaultValue("")
System.ComponentModel.Bindable(true)
Method
System.Void
To be added
To be added
The that contains the previously saved state.
1.0.5000.0
2.0.0.0
Property
System.String
Location of the link.
Use the property to specify the URL to navigate to when the control is clicked.
Gets or sets the URL to link to when the control is clicked.
1.0.5000.0
2.0.0.0
System.Web.UI.UrlProperty
System.ComponentModel.Editor("System.Web.UI.Design.UrlEditor, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof(System.Drawing.Design.UITypeEditor))
System.ComponentModel.DefaultValue("")
System.ComponentModel.Bindable(true)
Method
System.Void
a
To be added
Displays the control on a page.
1.0.5000.0
2.0.0.0
Property
System.String
Frame's name for displaying the link.
Use the property to specify the frame or window that displays the Web page linked to when the control is clicked. The Web page is specified by setting the property.
If this property is not set, the browser or window with focus refreshes when the control is clicked.
The property renders as a target attribute. The target attribute on anchor elements is not allowed in the XHTML 1.1 document type definition. Do not set the property if the rendered output for the must be XHTML 1.1 compliant. For more information, refer to the topic ASP.NET and XHTML Compliance.
When creating accessible Web pages, it is strongly recommended you avoid using the property to target another window. For more information, see Accessibility in Visual Studio 2010 and ASP.NET 4 and ASP.NET Controls and Accessibility.
Gets or sets the target window or frame in which to display the Web page content linked to when the control is clicked.
1.0.5000.0
2.0.0.0
System.ComponentModel.TypeConverter(typeof(System.Web.UI.WebControls.TargetConverter))
System.ComponentModel.DefaultValue("")
Property
System.String
Text of the anchor.
The control can be displayed as text or an image. Use the property to specify the text to display for the control.
If both the and properties are set, the property takes precedence. If the image is unavailable, the text in the property is displayed. In browsers that support ToolTip functionality, the property also becomes the ToolTip.
This control can be used to display user input, which might include malicious client script. Check any information that is sent from a client for executable script, SQL statements, or other code before displaying it in your application. ASP.NET provides an input request validation feature to block script and HTML in user input. Validation server controls are also provided to assess user input. For more information, see [<topic://cpconASPNETSyntaxForValidationControls>].
The value of this property, when set, can be saved automatically to a resource file by using a designer tool. For more information, see and ASP.NET Globalization and Localization.
Gets or sets the text caption for the control.
1.0.5000.0
2.0.0.0
System.ComponentModel.Localizable(true)
System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerDefaultProperty)
System.ComponentModel.DefaultValue("")
System.ComponentModel.Bindable(true)