where is session state, application state in page life cycle?

sly_Chandan picture sly_Chandan · Jan 28, 2011 · Viewed 7.2k times · Source

where is session state, application state in page life cycle?

Answer

El Ronnoco picture El Ronnoco · Jan 28, 2011

The Session and Application states are independent of the page lifecycle and can be accessed at any point during the page lifecycle.

Objects or variables which you store in session/application state will be persisted across postbacks on the server. Once they are there, they stay there, for the duration of the client session (in the case of SessionState) or for the duration of the application (in the case of ApplicationState).

This probably takes a few liberties in terms of accuracy but this is how I generally think of this mechanism as working.