Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Session and ViewState Question

Status
Not open for further replies.

prgmrgirl

Programmer
Feb 12, 2004
119
0
0
US
Hey guys,

I just read somewhere that Session is shared among multiple tabs open to the same site whereas ViewState is not. Is this true? I can see this causing some serious problems if a user has the same page open in two different tabs but the value being held in the Session variable should be different (an ID number for example) for each page.

Can someone just give me an overview of gotchas that could occur in this situation? I've been trying to troubleshoot an odd bug in something and I think this might be the cause.

Say you have a page that stores an ID for a customer in a session variable (tab1). Now the user opens another tab (tab2) and go to the same page and that is supposed to store an ID for another customer. What would/could happen in that scenario? Could the ID of one overwrite the other?

Thanks for the help!
prgmrgirl
 
I don't thing that occurs in tabs, but I am not definate on that. I'm sure you can find it somewhere on line. I would just create a simple page that stores some session vars and then open up multiple tabs. Have a way to set the vars and get them and see if it carries across tabs. That is the only way to be sure.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top