protected void Page_Load(object sender, EventArgs e) { if (Application["SharedRolodex"] == null) { Application["SharedRolodex"] = new AllCustomers(); } rolodex = (AllCustomers)Application["SharedRolodex"]; }
protected void ButtonAdd_Click(object sender, EventArgs e) { Customer c = new Customer( TextBoxName.Text, Int32.Parse(TextBoxAge.Text), Int32.Parse(TextBoxZip.Text), TextBoxPass.Text, TextBoxRegion.Text); rolodex = (AllCustomers)Application["SharedRolodex"]; rolodex.AddCustomer(c); Application["SharedRolodex"] = rolodex; Application.UnLock(); // UpdateCustomerListView(); }