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: property String^ DataNavigateUrlField { virtual String^ get(); virtual void set(String^ value); }
Property Value
Type: System::String^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 Forms Page Code Model. |
The following corresponding example displays the item selected in the previous example.
Available since 1.1
