954,593 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Hi how to store arraylist values in session state

Hi guys

I can used arraylist.I want to use that arraylist values in many places of my pages ..

i putting arraylist values in session state .

if my page is postback that arraylist getting values are incorrect,until page is not postbak arraylist getting correct value.


whats problem in page..

how to store arraylist value in session or viewstate ...with page is postback and not post back condition..


reply me

thanigaimani83
Newbie Poster
2 posts since Nov 2007
Reputation Points: 10
Solved Threads: 0
 

I'm not really sure if I understand your question...

If you write a Sub to add/modify an ArrayList to the SessionState, it should save it. You must postback to get the correct values saved to session state. If you just use a hyperlink, for instance, to go to another page, it might not postback, but instead, just go to the other page.

Make sure when you go to another page, it's either after you've done a PostBack to save session state. However you do it, it's going to be required to get the correct values in there. The server doesn't know you've made a change to the state if you don't post back.

alc6379
Cookie... That's it
Team Colleague
2,820 posts since Dec 2003
Reputation Points: 186
Solved Threads: 147
 

You need to Serialize it I think...maybe use the server's session instead.

shaulf
Newbie Poster
18 posts since Nov 2007
Reputation Points: 10
Solved Threads: 4
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You