protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e) { if (Convert.ToInt32(DropDownList1.SelectedValue) == 1) { Panel_Entry.Visible = true; Panel_Cash.Visible = false; } else if (Convert.ToInt32(DropDownList1.SelectedValue) == 2) { Panel_Cash.Visible = true; Panel_Entry.Visible = false; PanelCartDisplay.Visible = false; PanelPaymentSelection.Visible = false; Random rnd = new Random(); int receiptNum = rnd.Next(100000, 999999); lbl_ReceiptNum.Text = receiptNum.ToString(); lbl_ItemList.Text = bookstorebo.retrieveProductFromCart(); lbl_Cost.Text = bookstorebo.retrieveProductCostForCart(); lbl_PurchaseDate.Text = DateTime.Now.ToString("dd MMMM yyyy hh:mm tt"); } else if (Convert.ToInt32(DropDownList1.SelectedValue) == 0) { Panel_Entry.Visible = false; } }