Lists in session
One of my colleagues came up to me the other day with a problem she had. She was doing a SELECT in the database, placing the values in a List and sending them over to the page. Later in the page, for some reason which I have forgotten, she took one of the items in the list and stored it into a variable. She then changed the value of the variable. After this point, she began printing out the values in the List in the session. But now the values being printed out contain the modified value. She said she wasabsolutely not placing the modified value back into the session!!
Flabbergasted, I asked her to place an Integer type into the session, and in the page, asked her to take the Integer and store it in a page-level variable. I asked her to change the value of the variable, and then print out the value of the Integer in the session. She reported back saying that it printed the original value.
What could be the reason behind the value automatically getting updated in the List?
Message was edited by:
TopCoder

