HyperLinkColumn::DataNavigateUrlField Property
Gets or sets the field from a data source to bind to the URL of the hyperlinks in the HyperLinkColumn.
Assembly: System.Web (in System.Web.dll)
public: virtual property String^ DataNavigateUrlField { String^ get (); void set (String^ value); }
Property Value
Type: System::StringThe 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 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Note