View Full Version : Session state or global?
reiji
06-24-2004, 06:21 AM
In order to pass data from one page to another, I have used both session state and global variable to make it work. However, I feel uncomfortable with either approach.
Could someone offer some pros and cons for either methods? Is there another way(s) to pass data between pages?
Thanks.
- reiji
pjoyce
06-25-2004, 11:17 AM
[b]quote:Originally posted by reiji
In order to pass data from one page to another, I have used both session state and global variable to make it work. However, I feel uncomfortable with either approach.
Could someone offer some pros and cons for either methods? Is there another way(s) to pass data between pages?
</blockquote id="quote"></font id="quote">
You can pass data in hidden fields or through the URLString (http://SomeHost.com/SomePage.aspx?MyVar=100) Look at the Request object for the syntax of how to retrieve it. There's no reason to feel uncomfortable about using session (anymore), but you should try not to store things that are too large in session. For instance, don't store your entire user database in there. Store things that are relevant to the current user's session.
Swood
07-05-2004, 05:01 AM
I Just started using session state and I was wondering if there is a good way to trap session timeout . .So far I just get server errors when the session times out
Rollins
07-06-2004, 12:51 PM
See the "Loss of Session" topic in this section.
[b]quote:Originally posted by Swood
I Just started using session state and I was wondering if there is a good way to trap session timeout . .So far I just get server errors when the session times out
</blockquote id="quote"></font id="quote">
Rollins
RollinsTurner.com
ElucidWeb
07-11-2004, 09:39 AM
There are nine ways according to microsoft documentation all have their drawbacks and benefits. I suggest you look at each one and determine for the data you are using which one to use, you should use multiple methods throughout your web application to increase performance, some methods tailor better for large chunks while some tailor better for smaller.
msdn.microsoft.com/msdnmag/issues/03/04/ASPNETUserState/default.aspx (http://msdn.microsoft.com/msdnmag/issues/03/04/ASPNETUserState/default.aspx)
vBulletin® ©Jelsoft Enterprises Ltd.