RepeaterItemCollection.RepeaterItemCollection Constructor
.NET Framework 3.0
Initializes a new instance of the RepeaterItemCollection class.
Namespace: System.Web.UI.WebControls
Assembly: System.Web (in system.web.dll)
Assembly: System.Web (in system.web.dll)
public RepeaterItemCollection ( ArrayList items )
public function RepeaterItemCollection ( items : ArrayList )
Not applicable.
Parameters
- items
A System.Collections.ArrayList that contains the items with which to initialize the collection.
void Page_Load(Object Sender, EventArgs e)
{
if (!(get_IsPostBack())) {
ArrayList myDataSource = new ArrayList();
myDataSource.Add(new PositionData("Item 1", "$6.00"));
myDataSource.Add(new PositionData("Item 2", "$7.48"));
myDataSource.Add(new PositionData("Item 3", "$9.96"));
// Initialize the RepeaterItemCollection using the
// ArrayList as the data source.
RepeaterItemCollection myCollection
= new RepeaterItemCollection(myDataSource);
myRepeater.set_DataSource(myCollection);
myRepeater.DataBind();
}
} //Page_Load
Community Additions
ADD
Show: