System.Web.UI.WebControls.ButtonField.Text Property

Gets or sets the static caption that is displayed for each button in the System.Web.UI.WebControls.ButtonField object.

Syntax

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

Value

Documentation for this section has not yet been entered.

Remarks

When the ButtonFieldBase.ButtonType property of a System.Web.UI.WebControls.ButtonField object is set to the ButtonType.Button or ButtonType.Link value, use the ButtonField.Text property to display static text for the caption of the buttons in the System.Web.UI.WebControls.ButtonField. Each button shares the same caption.

Instead of using the ButtonField.Text property to display static text in a System.Web.UI.WebControls.ButtonField object, you can use the ButtonField.DataTextField property to bind the System.Web.UI.WebControls.ButtonField to a field in a data source. The values of the field are then displayed as the caption of the buttons.

Note:

If the ButtonField.DataTextField and ButtonField.Text properties are both set, the ButtonField.DataTextField property takes precedence.

The value of this property is stored in view state.

The value of this property, when set, can be saved automatically to a resource file by using a designer tool. For more information, see System.ComponentModel.LocalizableAttribute and ASP.NET Globalization and Localization.

Requirements

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