I have a login page that return the userName to a page called User.aspx. The User.aspx shows the information about the user based on a sql select. I fill 12 labels on the page with the result of the select. I want to keep the information of my 12 labels if the user Quits and enter again in the page.
I save my session
Session("UserPage") = (litHello.Text And litAddresse.Text And litAnimalGenre.Text And litCouriel.Text And litNomAnimal.Text And litPays.Text And litPostalCode.Text And litProvince.Text And litRace.Text And litTel.Text And litVille.Text)
Now how I can proceed too fill all my label with my saved session call UserPage??? That is the question !!! The code is VB.NET
Thank’s for helping me
Answer on your question:
I would make a class with multiple properties and save that in the session 😉
Eg.
Then (the long way)
And finally store
or the shorter way (still need to declare PropertySession)
You can even do this – only to be complete, but i wouldn’t do this if i were you –
Additional
There are 8 ways to store data of a user to the next page.
Check out which one is good enough for you.