RepeaterItemCollection.RepeaterItemCollection Constructor

Initializes a new instance of the RepeaterItemCollection class.

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

public:
RepeaterItemCollection (
	ArrayList^ items
)
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.

Use this constructor to create and initialize a new instance of the RepeaterItemCollection class.

No code example is currently available or this language may not be supported.
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

Windows 98, Windows Server 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0

Community Additions

ADD
Show: