System.Web.UI.HtmlControls.HtmlSelect.DataMember Property

Gets or sets the set of data to bind to the System.Web.UI.HtmlControls.HtmlSelect control from a HtmlSelect.DataSource property with multiple sets of data.

Syntax

[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
[System.ComponentModel.DefaultValue("")]
public virtual string DataMember { set; get; }

Value

Documentation for this section has not yet been entered.

Remarks

If the HtmlSelect.DataSource property contains multiple sets of data, use the HtmlSelect.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 System.Web.UI.WebControls.ListItem.Text and System.Web.UI.WebControls.ListItem.Value properties of each item in the control by setting the HtmlSelect.DataTextField and HtmlSelect.DataValueField properties, respectively.

Requirements

Namespace: System.Web.UI.HtmlControls
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0