Hi Girish,
Are you saying I have to put the objects there? I cannot configure them to be
session scoped and have then created when a session starts?
When we're talking about scope, we're talking about memory (for the most
part - Session data can also be stored in a database, but must be
serializable in order to do so). Every Application has memory. In this case,
we're talking about a web server application, which is the memory space used
by ASP.Net for each web application defined in IIS. The application memory
space is where everything in the application's memory is stored. This
includes Application State, which is a Collection, Application Cache, which
is another Collection, and Session State, which is another Collection. Note
that all of these exist in the same "scope" which is the application memory
space of the app, which is global to the application. Session is not a
scope, but a Collection. Therefore, you can add and remove objects from the
Collection, but you can certainly not define them as having "Session Scope."
So, you could certainly create an instance of a class and store it in
Session when the Session starts, by using the global Session_OnStart event
handler.
--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living