Hi arimakidd,
You seem to be mixing up events.
Application_OnStart fires when the entire application starts (e.g. on the first hit after IIS has started) and is *not* user related.
The "main page" is hard to track; Session_OnStart fires when the user hits *any* page in your site, beit the main page or a page 7 levels deep in your site. Session_OnEnd fires when you either explicitly end the Session (using Session.Abandon), the session times out (by default, this is 20 minutes after the last request has been made) or when the entire application is shut down (because you stop IIS for example).
If you want to track a single page, your best bet is to store an individual variable in session state. Not in the global.asa, but in the main page. Then other pages can assign another variable to the session and later you can compare the two values.
Another alternative is to use cookies or page level variables, like hidden fields.
Does this help?
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
|