Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles
(untagged)

hyperlink

0.00/5 (No votes)
25 Feb 2008 1  
Use the HyperLink control to create a link that moves you to another page or location on the page. Specify the page or location to link to by using

This articles was originally at wiki.asp.net but has now been given a new home on CodeProject. Editing rights for this article has been set at Bronze or above, so please go in and edit and update this article to keep it fresh and relevant.

Use the HyperLink control to create a link that moves you to another page or location on the page. Specify the page or location to link to by using the NavigateUrl property. The link can either be displayed as text or an image. To display text, either set the Text property or place the text between the opening and closing tags of the HyperLink control. To display an image, set the ImageUrl property.

If both the Text and ImageUrl properties are set, the ImageUrl property takes precedence. If the image is unavailable, the text in the Text property is then displayed. On browsers that support the ToolTips feature, the value of the Text property is displayed when the mouse pointer is placed over the HyperLink control.

Text is not HTML encoded before it is displayed in the HyperLink control. This makes it possible to embed script within HTML tags in the text. If the values for the control come from user input, be sure to validate the values to help prevent security vulnerabilities.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here