ListBox shows System.Collection.ArrayList

blindkilla

New Member
i have a listbox on one page which carries the items in the listbox to another list box on another page, but when the second listbox shows "System.Collection.ArrayList".Page1:\[code\]protected void btnCheckout_Click(object sender, EventArgs e){ Session["Name"] = NameText.Text; Session["PhoneNumber"] = PhoneTextBox.Text; Session["Address"] = AddressText.Text; Session["Email"] = emailText.Text; Session["City"] = cityTextBox.Text; ArrayList al = new ArrayList(); for (int i = 0; i < ItemListBox.Items.Count; i++) { if (ItemListBox.Items.Selected == true) { al.Add(ItemListBox.Items.Value); } } Session["selectedValues"] = al; Response.Redirect("Invoice.aspx");}\[/code\]Page2:\[code\]protected void Page_Load(object sender, EventArgs e){ string phoneNumber = (string)(Session["PhoneNumber"]); string homeAddress = (string)(Session["Address"]); string name = (string)(Session["Name"]); string email = (string)(Session["Email"]); string city = (string)(Session["City"]); phoneLabel.Text = phoneNumber; addressLabel.Text = homeAddress; nameLabel.Text = name; emailLabel.Text = email; cityLabel.Text = city; invoiceListBox.Items.Add(Session["selectedValues"].ToString());}\[/code\]All other label session do work, it is only the listbox that does not work
 
Top