Image credit: codeproject.com
In this article, we will highlight the simplest ways to implement an Asp.Net Best State Management Techniques over stateless http protocol which carries the burden of communication
between the Web Server that serves the asp.net pages to the client browser per request.
The concept behind the state management is simple. Have you ever looked at the desktop based C#
applications which use windows forms? Look at the way how smoothly the forms can access their data with each other without the need of anything special.
Since the web pages work http(Hyper Text Transfer Protocol), the linkage between these web pages is not that easily possible implement some mechanism that retains the states of the desired pages in order exchange the required data between them.
Despite the fact that numerous inquiries or requests can be sent over the same HTTP protocol as a means of communication, the server does not maintain a state of a request once it has been processed. The basic concept behind that fact is simple.
In order to maintain the bandwidth or data transmission speed, it is not possible for a server to separately stores anything about the request of the client web browser because millions of clients might be accessing that same server and if the server keeps on memorizing each request separately, then there comes a time when the server will get down due to enormous amount of load in its memory. That is why the http web page requests and responses do not maintain any state about the connection when it is broken
The simplest mechanism that is available is the sending of a small file called a cookie from the web server to the client to keep the session ID stored in it.
Don’t forget to read my awesome post regarding the complete mechanisms of state management in asp.net application with some great and well explanatory examples here at wikinut