System.Web.UI.WebControls.ButtonColumn.DataTextField Property

Gets or sets the field name from a data source to bind to the System.Web.UI.WebControls.ButtonColumn object.

Syntax

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

Value

Documentation for this section has not yet been entered.

Remarks

Use the ButtonColumn.DataTextField property to specify the field name from the data source to bind to the ButtonColumn.Text property of the buttons in the System.Web.UI.WebControls.ButtonColumn object.

Binding the column to a field instead of directly setting the ButtonColumn.Text property allows you to display different captions for the buttons in the System.Web.UI.WebControls.ButtonColumn by using the values in the specified field.

The value of this property is stored in view state.

Requirements

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