asp.net.ph

HyperLink.NavigateUrl Property

System.Web.UI.WebControls Namespace   HyperLink Class


Sets or retrieves the destination of the HyperLink control.

Syntax


Inline <asp:hyperlink navigateurl = strUrl ... >
Script HyperLink.NavigateUrl [ = strUrl ]

Property Value


strUrl String specifying the URL to link to when the hyperlink is clicked.

The property is read/write with no default value.

Remarks

Use the NavigateUrl property to specify or determine the URL to navigate to when the HyperLink control is clicked.

The NavigateUrl property on a hyperlink can refer to:

  • any valid URI
  • any valid anchor point or bookmark within a document.

In certain cases, as when hyperlinks are used within templated controls, the NavigateUrl property is usually obtained dynamically from a data source.

Example

The following example shows how to declaratively set the ImageUrl property of a HyperLink control at design time.

<asp:hyperlink runat = "server" 
   text = "Simply awesome"
   imageurl = "~/shared/aspxtreme.jpg"
   navigateurl = "~/index.aspx" />

The following examples demonstrate how to dynamically bind the NavigateUrl property of HyperLink controls defined within templates.

Custom Paging with AutoIncrement Data Model
Run Sample | View Source
DataGrid Columns Property
Run Sample | View Source
See Also

HyperLink Members   ImageUrl   Text Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph