asp.net.ph

ListControl.DataMember Property

System.Web.UI.WebControls Namespace   ListControl Class


Sets or retrieves the specific table in the DataSource to bind to the control.

Syntax


Inline <asp:ListControl datamember = strTableName ... >
Script ListControl.DataMember [ = strTableName ]

Property Value


strTableName String specifying a table in the DataSource.

The property is read/write with no default value.

Remarks

If the DataSource contains multiple sets of data ( more than one table ), use the DataMember property to specify which table to bind to the control.

NOTE: If this property is not set, the first table in the DataSet is used by default.

Once you've 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.

See Also

ListControl Members   DataSource   DataTextField   DataValueField Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph