FederalProgrammer
Programmer
In VB (or C#) .net, it's very easy to add an object to a listbox:
I tried the same thing in ASP .NET (No luck!)
So, now I've "bounded" my ListBox to an arraylist of Objects. The way it works is as follows: User interacts with the system to create the object. Then user clicks on "Add to List" button at which point the new object should be added to the listbox;
My problem is that, as the user clicks on "Add to list" button, the size of the arraylist doesn't change (it is always equal to 1 and the arraylist contains the most recent object)
Somehow, the arraylist gets re-initialized, everytime my user clicks on the "Add to List" button! (I have even tried to store this arraylist as a session variable... still the arraylist contains only 1 item!!)
Any ideas?
---------------
Code:
dim obj as someObject
listbox1.items.add(obj)
I tried the same thing in ASP .NET (No luck!)
So, now I've "bounded" my ListBox to an arraylist of Objects. The way it works is as follows: User interacts with the system to create the object. Then user clicks on "Add to List" button at which point the new object should be added to the listbox;
My problem is that, as the user clicks on "Add to list" button, the size of the arraylist doesn't change (it is always equal to 1 and the arraylist contains the most recent object)
Somehow, the arraylist gets re-initialized, everytime my user clicks on the "Add to List" button! (I have even tried to store this arraylist as a session variable... still the arraylist contains only 1 item!!)
Any ideas?
---------------