HtmlSelect.DataMember Property
.NET Framework 3.0
Gets or sets the set of data to bind to the HtmlSelect control from a DataSource property with multiple sets of data.
Namespace: System.Web.UI.HtmlControls
Assembly: System.Web (in system.web.dll)
Assembly: System.Web (in system.web.dll)
/** @property */ public String get_DataMember () /** @property */ public void set_DataMember (String value)
public function get DataMember () : String public function set DataMember (value : String)
Not applicable.
Property Value
The set of data to bind to the HtmlSelect control from a DataSource with multiple sets of data. The default value is an empty string (""), which indicates the property has not been set.If the DataSource property contains multiple sets of data, use the DataMember property to specify which set of data to bind to the control. For example, if you have a System.Data.DataSet object with multiple tables, use this property to indicate which table to bind to the control.
After you have specified the data source to bind to the control, you can then specify which fields from the data source to bind to the ListItem.Text and ListItem.Value properties of each item in the control by setting the DataTextField and DataValueField properties, respectively.
Community Additions
ADD
Show: