Gets or sets the source of information to bind to the System.Web.UI.HtmlControls.HtmlSelect control.
Documentation for this section has not yet been entered.
Use the HtmlSelect.DataSource property to specify the data source to bind to the System.Web.UI.HtmlControls.HtmlSelect control. A data source must be a collection that implements either the IEnumerable interface (such as System.Data.DataView, ArrayList, or List`1) or the System.ComponentModel.IListSource interface. When you set the HtmlSelect.DataSource property, you must manually write the code to perform data binding.
If the data source contains multiple sets of data, such as a System.Data.DataSet object with multiple tables, use the HtmlSelect.DataMember property to specify which data set to bind to the control.
You can 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.
Alternately, you can use the HtmlSelect.DataSourceID property to automatically bind to a data source represented by a data source control. When you set the HtmlSelect.DataSourceID property, the data listing control automatically binds to the specified data source control. You do not need to write code that explicitly calls the System.Web.UI.Control.DataBind method.
If values are specified for both the HtmlSelect.DataSource property and the HtmlSelect.DataSourceID property, ASP.NET is not able to resolve the data source and a System.Web.HttpException exception is thrown.