ButtonField.DataTextField Property
Assembly: System.Web (in system.web.dll)
public: virtual property String^ DataTextField { String^ get (); void set (String^ value); }
/** @property */ public String get_DataTextField () /** @property */ public void set_DataTextField (String value)
public function get DataTextField () : String public function set DataTextField (value : String)
Property Value
The name of the field to bind to the ButtonField. The default is an empty string (""), which indicates that the DataTextField property is not set.When the ButtonType property of a ButtonField object is set to the Button or Link value, use the DataTextField property to specify the name of the field to bind to the ButtonField object. The values of the field are then displayed as the text for the buttons in the ButtonField object. Optionally, you can format the displayed text by setting the DataTextFormatString property.
Instead of using the DataTextField property to bind a ButtonField object to a field from a data source, you can use the Text property to display static text for the text of the buttons in the ButtonField object. When the Text property is used, each button shares the same caption.
Note |
|---|
| If the DataTextField and Text properties are both set, the DataTextField property takes precedence. |
The value of this property is stored in view state.
Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.
Note