System.Web.UI.WebControls.HyperLinkColumn.DataTextField Property

Gets or sets the field from a data source to bind to the text caption of the hyperlinks in the System.Web.UI.WebControls.HyperLinkColumn.

Syntax

[System.ComponentModel.DefaultValue("")]
public virtual string DataTextField { set; get; }

Value

Documentation for this section has not yet been entered.

Remarks

Use the HyperLinkColumn.DataTextField property to specify the field name from a data source to bind to the text caption of the hyperlinks in System.Web.UI.WebControls.HyperLinkColumn. When the text caption is data bound to a field, the text caption of each hyperlink in the column is set with a corresponding value in the specified field. This allows you to set a different text caption for each hyperlink in the column. To specify the same text caption for each row in the column, set the HyperLinkColumn.Text property instead of this property.

Note:

The HyperLinkColumn.DataTextField and HyperLinkColumn.Text properties cannot both be set at the same time. If both properties are set, the HyperLinkColumn.DataTextField property takes precedence.

When you using data binding, you can specify a custom display format for the text caption of the hyperlinks by setting the HyperLinkColumn.DataTextFormatString property.

Requirements

Namespace: System.Web.UI.WebControls
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0