ListControl.DataValueField Property
.NET Framework 3.0
Gets or sets the field of the data source that provides the value of each list item.
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^ DataValueField { String^ get (); void set (String^ value); }
/** @property */ public String get_DataValueField () /** @property */ public void set_DataValueField (String value)
public function get DataValueField () : String public function set DataValueField (value : String)
Not applicable.
Property Value
A System.String that specifies the field of the data source that provides the value of each list item. The default is String.Empty.Use this property to specify the field that contains the value of each item 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 DataValueField for the RadioButtonList control. The DataValueField is the value for the each item in the RadioButtonList.
Community Additions
ADD
Show: