Session Question

T

TCORDON

I have a site that is supposed to work for 2 different countries, I was
handling the selected country (selected when someone entered the site) in a
session variable that carried the Id of the country (1 or 2) and that is
good for me so that i can get the data from the DB for that country. The
problem comes when the Session Variable expires! how can I handle that? I
need every page to know, when it loads, what country has the user selected.

Thanks
 
G

Guest

TCORDON said:
I have a site that is supposed to work for 2 different countries, I was
handling the selected country (selected when someone entered the site) in a
session variable that carried the Id of the country (1 or 2) and that is
good for me so that i can get the data from the DB for that country. The
problem comes when the Session Variable expires! how can I handle that? I
need every page to know, when it loads, what country has the user selected.

Thanks

Here are some suggestions:

1- Save the country code in a cookie that never expires on the user's desktop,
2- Save the country code on every page (using the ViewState) then retrieve
it when the page is posted back,
3- Redirect the user to the entry page (where they select the country) when
the session expires
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,679
Members
48,796
Latest member
Greg L.

Latest Threads

Top