December 2001
Intermediate to advanced
416 pages
8h 16m
English
How do we correctly maintain values across posts back of a page? An HttpSessionState class object is maintained for each user that requests a page from an ASP.NET application. We store and retrieve values within this session object that we wish to persist across posts back. This object can be accessed through the page's Session property.
To initialize the values within the Session object, we need a hook into its initialization. The Session_Start() event handler provides just that hook. It is invoked once just prior to the start of a session. This is where we will insert our Anna, Pooh, and Miss count values that we increment with each appropriate user mouse click—for example,
protected void Session_Start(Object ...
Read now
Unlock full access