December 2001
Intermediate to advanced
416 pages
8h 16m
English
There is analogous support for maintaining values across sessions within the Application object. The Global class provides a skeletal definition of an Application_Start() event handler. It is invoked once at the start of the application. This is where we initialize global data for our application. For example, let's provide values to hold total mouse clicks across all sessions:
protected void
Application_Start(Object sender, EventArgs e)
{
Application.Add( "TotalAnnaCount", 0 );
Application.Add( "TotalPoohCount", 0 );
Application.Add( "TotalMissCount", 0 );
}
These values can be accessed concurrently through multiple sessions, so we need to be more careful when writing them. For example, the following ...
Read now
Unlock full access