Sure you can put the variables in the global asax file. The downside to that
is it is now accessible to the entire application so the usual
synchronization issues apply.
> is there a way to use class members as if they were a
> session variable?
I'm not sure what you mean by this. Are you thinking in terms of syntax?
Session["somestuff"] = "blah". You can force this effect on a class by
overloading the indexer property to get it to behave as if it had dictionary
like syntax. If you are thinking about using the variable and it going away
once the session end, you will have to manually code that by tieing in to
the session end event and taking the appropriate action to empty these
variables which is the reason session is around anyway.
The memory store for these objects aren't all that expensive by the way and
the extra functionality provided by state managed objects negate the
negative -effects if any- so this really shouldn't be a determining factor
in most applications unless you are squeezing for efficiency.

Signature
Regards,
Alvin Bruney
http://www.networkip.net/dotnet/tidbits/default.htm
> Well, I just want to know if there is a stable
> recommanded technique to maintaine application and
[quoted text clipped - 47 lines]
> >
> >.
Khaled M. Hnidk - 08 Dec 2003 11:20 GMT
I think the primary factor of choice is the purpose Appliaction, Session and
cach are designed for deferent purposes surly you can use them the way you
like - as long they fullfill the needs - but that won't get you the best
results.
for instance
Session : short time (spans to user' sesion) small data + fits well in web
farm - definitly per user
application: appliaction life time - available to all users
both provide exclent locking mechnasim
programmable life time and dependcy. all users share all data in addion it
to that has the needed locking mechnasim
Hnidk
> Sure you can put the variables in the global asax file. The downside to that
> is it is now accessible to the entire application so the usual
[quoted text clipped - 67 lines]
> > >
> > >.
Khaled M. Hnidk - 08 Dec 2003 11:22 GMT
yeah one more thing.. chaching can be per page/control output which is not
possible in session / application or suggessted static variable (unless u
used some devlish way to do that)
Hnidk
> Sure you can put the variables in the global asax file. The downside to that
> is it is now accessible to the entire application so the usual
[quoted text clipped - 67 lines]
> > >
> > >.