using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class UsingCustomCollection : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
       // create sample customer objects
       Customer c1 = new Customer("334", "Thomas", "Hobbes", "123-4567");
       Customer c2 = new Customer("123", "Jean-Jacques", "Rosseau", "456-1267");
       Customer c3 = new Customer("085", "David", "Hume", "564-7823");
       Customer c4 = new Customer("254", "Martin", "Heidegger", "253-6383");

       CustomerCollection cc = new CustomerCollection();
       cc.Add(c1);
       cc.Add(c2);
       cc.Add(c3);
       cc.Add(c4);

       drpSample.DataSource = cc;
       drpSample.DataBind();
    }
}
