Thursday, August 7, 2008

State Management in ASP.NET

Web form pages are HTTP-Based, they are stateless, which means they don’t know whether the requests are all from the same client, and pages are destroyed and recreated with each round trip to the server, therefore information will be lost, therefore state management is really an issue in developing web applications

We could easily solve these problems in ASP with cookie, query string, application, session and so on. Now in ASP.NET, we still can use these functions, but they are richer and more powerful, so let’s dive into it.

Mainly there are two different ways to manage web page’s state: Client-side and Server-side.
1.Client-side state management :  
  •  cookie  
  • hidden field  
  • View State
  • Query strings 
2. Server-side state management: 
  • Application object 
  • Session object 
  • Database
      

No comments: