HyperLinkField::NavigateUrl Property
Gets or sets the URL to navigate to when a hyperlink in a HyperLinkField object is clicked.
Assembly: System.Web (in System.Web.dll)
public: virtual property String^ NavigateUrl { String^ get (); void set (String^ value); }
Property Value
Type: System::StringThe URL to navigate to when a hyperlink in a HyperLinkField is clicked. The default is an empty string (""), which indicates that this property is not set.
Use the NavigateUrl property to specify the URL to navigate to when a hyperlink in a HyperLinkField object is clicked. When this property is set, each hyperlink shares the same navigation URL.
Instead of using this property to set the URL for the hyperlinks, you can use the DataNavigateUrlFields property to bind the URLs of the hyperlinks to a field in a data source. This allows you to have a different URL for each hyperlink.
Note: |
|---|
If the DataNavigateUrlFields and NavigateUrl properties are both set, the DataNavigateUrlFields property takes precedence. |
The following code example demonstrates how to use the NavigateUrl property to specify a static Web page to navigate to when a hyperlink in a HyperLinkField object is clicked.
Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Note: