HyperLinkField.NavigateUrl Property

This property supports the .NET Framework infrastructure and is not intended to be used directly from your code.

Gets or sets the URL to navigate to when a hyperlink in a HyperLinkField object is clicked.

Namespace: System.Web.UI.WebControls
Assembly: System.Web (in system.web.dll)

public:
virtual property String^ NavigateUrl {
	String^ get ();
	void set (String^ value);
}
/** @property */
public String get_NavigateUrl ()

/** @property */
public void set_NavigateUrl (String value)

public function get NavigateUrl () : String

public function set NavigateUrl (value : String)

Not applicable.

Property Value

The 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.

NoteNote:

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.

No code example is currently available or this language may not be supported.

Windows 98, Windows Server 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0

Community Additions

ADD
Show: