HyperLinkColumn.DataNavigateUrlField Property
Assembly: System.Web (in system.web.dll)
public: virtual property String^ DataNavigateUrlField { String^ get (); void set (String^ value); }
/** @property */ public String get_DataNavigateUrlField () /** @property */ public void set_DataNavigateUrlField (String value)
public function get DataNavigateUrlField () : String public function set DataNavigateUrlField (value : String)
Property Value
The field from a data source to bind to the URL of the hyperlinks in the HyperLinkColumn.Use the DataNavigateUrlField property to specify the field from a data source to bind to the URL of the hyperlinks in the HyperLinkColumn. When the URL is data bound to a field, the URL of each hyperlink in the column is set with a corresponding value in the specified field. This allows you to set a different URL for each hyperlink in the column. To specify the same URL for each row in the column, set the NavigateUrl property instead of this property.
Note |
|---|
| The DataNavigateUrlField and NavigateUrl properties cannot both be set at the same time. If both properties are set, the DataNavigateUrlField property takes precedence. |
When you are using data binding, you can specify a custom display format for the URL of the hyperlinks by setting the DataNavigateUrlFormatString property.
The following example demonstrates how to use the DataNavigateUrlField property to specify the field in a data source to bind to the URL of the hyperlinks in the HyperLinkColumn.
Note |
|---|
| The following code sample uses the single-file code model and may not work correctly if copied directly into a code-behind file. This code sample must be copied into an empty text file that has an .aspx extension. For more information on the Web Forms code model, see ASP.NET Web Page Code Model. |
The following corresponding example displays the item selected in the previous example.
Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.
Note