ListControl.DataTextField Property
.NET Framework 3.0
Gets or sets the field of the data source that provides the text content of the list items.
Namespace: System.Web.UI.WebControls
Assembly: System.Web (in system.web.dll)
Assembly: System.Web (in system.web.dll)
[ThemeableAttribute(false)] 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)
Not applicable.
Property Value
A System.String that specifies the field of the data source that provides the text content of the list items. The default is String.Empty.Use this property to specify a field in the DataSource property to display as the items of the list in a list control.
The value of this property is stored in view state.
This property cannot be set by themes or style sheet themes. For more information, see ThemeableAttribute and Introduction to ASP.NET Themes.
The following example demonstrates how to specify the DataTextField for the RadioButtonList control. The DataTextField is the text that is displayed in the RadioButtonList.
Community Additions
ADD
Show: