System.Web.UI.WebControls.BoundField.DataField Property

Gets or sets the name of the data field to bind to the System.Web.UI.WebControls.BoundField object.

Syntax

[System.ComponentModel.DefaultValue("")]
[System.ComponentModel.TypeConverter("System.Web.UI.Design.DataSourceViewSchemaConverter, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
public virtual string DataField { set; get; }

Value

Documentation for this section has not yet been entered.

Remarks

Use the BoundField.DataField property to specify the name of the data field to bind to the System.Web.UI.WebControls.BoundField object. The values of the specified field are displayed in the System.Web.UI.WebControls.BoundField object as text. You can optionally format the displayed text by setting the BoundField.DataFormatString property.

Note:

If a field's value is null, an empty string ("") is displayed for the value by default. To specify an alternate caption, set the BoundField.NullDisplayText property.

Requirements

Namespace: System.Web.UI.WebControls
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0