asp.net.ph

Repeater.DataSource Property

System.Web.UI.WebControls Namespace   Repeater Class


Sets or retrieves the data source that populates the items of the list.

Syntax


Inline <asp:repeater datasource = enumerable ... >
Script Repeater.DataSource [ = enumerable ]

Property Value


enumerable An IEnumerable collection that contains the data to bind to the control.

The property is read/write with no default value.

Remarks

Use this property to specify a source of data to populate a Repeater control.

NOTE: The data source must be an object that implements the System.Collections.IEnumerable interface, such as a DataView, an ArrayList, or a Hashtable.

Example

The following example illustrates using the DataSource property to dynamically obtain the data to bind to a Repeater control at run time. The data source in this case uses an instance of the OleDbDataReader class.

 Show me 

See Also

Repeater Members   DataMember 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