BaseDataList::DataMember Property

 

Gets or sets the specific data member in a multimember data source to bind to a data listing control.

Namespace:   System.Web.UI.WebControls
Assembly:  System.Web (in System.Web.dll)

public:
[ThemeableAttribute(false)]
property String^ DataMember {
	String^ get();
	void set(String^ value);
}

Property Value

Type: System::String^

A data member from a multimember data source. The default value is String::Empty.

Use the DataMember property to specify a member from a multimember data source to bind to the list control. For example, if you have a data source with more than one table specified in the DataSource property, use the DataMember property to specify which table to bind to a data listing control.

This property cannot be set by themes or style sheet themes. For more information, see ThemeableAttribute and ASP.NET Themes and Skins.

The following code example demonstrates how to use the DataMember property to specify which table in a DataSet object to bind to a DataGrid control.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 1.1
Return to top
Show: