.Net State Management

.Net applications are communicate with server through the HTTP protocol.

·         Client Requests from server through the HTTP Protocol
·         Server Reply to client through the HTTP Protocol

But this HTTP protocol is stateless protocol.so when the client disconnect from the server every page controls are discard from the asp.net engine.but in some cases we need to keep state information during the page life cycle.so asp.net provide 4 state management techniques for that.
1.       View State
2.       Session State
3.       Application State
4.       Control  State
View State
Used to keep state information of page and it’s controls during the round trips. you can’t use view state to keep information within more than one page. So view state is mainly used to keep page specify data.
View state information are sent as part of the page post back data during the post back occurs.if you going to store large amount of information inside the view state it can make the performance problems.

tracking of view state changes is tuned on during the InitComplete event.If you didn't turned on view state tracking, any values added to view state are lost during the post backs. And also you can make changes to view state until the page's Prerender Complete event.

Session State
Information store as session are store in the server side and remain until session expire or explicitly remove.Session state can keep information within more than one page.Each session has a own session ID to them and The session ID is a read-only value that uniquely identifies the current clients to the Web server.
Sessions used to keep user specific information.if two users use the same application same time these two users have the separate session IDs.
If you store large amount of information inside sessions can increase bandwidth usage and page load time because these information are going through the network(from server to client and client to server).

Application State
Application State information is available to all pages, regardless of which user requests a page. so multiple users able to access to same application object.

When write or update in the application object you have to use Lock to avoid deadlock or conflict. after modify complete you need to unlock it immediately otherwise other users can't be access to the application object.

Control State
think that you need to keep information about your controls during round trip like selected tab or selected value from any custom control. simply you can keep those using view state.but if your page property turned off the view state you can't keep the state information for specific controller.
for that purpose you can use control state.control state allow you to keep controller specific information during the round trip. 
control state information can't tuned off as view states.so when using control state carefully to use it for relevant controls only because you can't disable them.