ASP.NET NavigateUrl Property

Definition and Usage

The NavigateURL property is used to set or return the URL of the HyperLink control.

Syntax

<asp:HyperLink NavigateUrl="URL" runat="server" />
Property Description
URL String, specifies the URL of the hyperlink control.

Example

The following example sets the URL for the HyperLink control:

<form runat="server">
<asp:HyperLink id="link1" runat="server" Text="W3School" /> 
NavigateUrl="http://www.codew3c.com" />
</form>

Example

Set the NavigateUrl Property for HyperLink Control