I have a homework assignment that is really getting me down. It is to design
a simple shopping cart that uses some dropdownLists to chose product and
quantity, and 3 buttons, one for add, view, and clear. The cart is to be
added to an arraylist, and saved in a cookie. My problem is that I can't
seem to get the add button to populate the arraylist. I have to the best
of my knowledge followed the intruction of my teacher, the book, and even
the .Net documentation. Basically i declare a page level arraylist variable,
and using one click event which gets the id of the button clicked and runs
the code based on a select case statement. for example.

<%@ page language="VB" %>
<Script runat="server">
dim colArrayList as new arraylist

Sub Click(s as object, e as EventArgs)
select case s.id
case "Add"
dim intItem as integer
intItem = CDBL(dropNumber.selecteditem.text)
colArrayList.add(intItem)
case "View"
dim i as integer
For each i in colArrayList
response.write(i)
next
case "clear"
colArrayList.clear
end select
end sub
</script>

There is some more to this project but i figured all that out. I appreciate
your help.
</script>