I try to setup a E-shop. Next to every item I\'ve an asp:imagebutton
when this imagebutton is clicked I\'m checking whehter the session varialbe session[\"bas
mesut:
Honestly Session memory can be very volitile. If the application goes down you can loose it, or like you said, if the user's session gets restarted you can loose it. Generally the options for Asp.Net are to store data in:
ViewState (stored as encrypted text accessable by your code-behind)
Session Memory (essentially a dictionary, but as above, a little
volatile)
ASP.Net's State Service (which stores the values in a separate process. watch out for server farm scenarios)
Cookies
Cache
Url Parameters
Each of these methods has a trade-off in terms of performance, memory, or being dependent on a user's environment. I would try a different method and see if that is more robust for you.