where is session state, application state in page life cycle?
Asked
Active
Viewed 7,288 times
8

Beytan Kurt
- 2,203
- 4
- 34
- 57

sly_Chandan
- 3,437
- 12
- 54
- 83
-
1Session and Application are state management mechanisms that are not limited to one page. So, why would you even expect to see them in a page life cycle? Maybe you need to elaborate on your question here. – Jagmag Jan 28 '11 at 10:12
-
1How dare you give me a -1 vote .....grrrrr....lol I am kidding – sly_Chandan Jan 28 '11 at 10:13
2 Answers
12
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.

El Ronnoco
- 11,753
- 5
- 38
- 65
1
Did you read ASP.NET Page life cycle -
http://msdn.microsoft.com/en-us/library/ms178473.aspx

Madhur Ahuja
- 22,211
- 14
- 71
- 124
-
I have read the page life cycle of asp.net from msdn. I guess I need to read the application life cycle as well. Thanks Madhur!! I have another article to read. – sly_Chandan Jan 28 '11 at 10:11
-
I guess the article is not easy to grasp. But I guess its nice to know something! – sly_Chandan Jan 28 '11 at 10:26