Friday, 13 February 2015

What is meant By State Management?? State management in ASP.NET

  • HTTP is a stateless protocol. Once the server serves any request from the user, it cleans up all the resources used to serve that request. These resources include the objects created during that request, the memory allocated during that request, etc.
  •  For a guy coming from a background of Windows application development, this could come as a big surprise because there is no way he could rely on objects and member variables alone to keep track of the current state of the application.
  • If we have to track the users' information between page visits and even on multiple visits of the same page, then we need to use the State management techniques provided by ASP.NET.


  •  State management is the process by which ASP.NET let the developers maintain state and page information over multiple request for the same or different pages.
Types of State Management

          There are mainly two types of state management that ASP.NET provides:
                            1. Client side state management
                            2. Server side state management.

             1. Client side state management
a  1.       When we use client side state management, the state related information will be stored on client side. This information will travel back and forth with every request and response. This can be visualized as:



    2.Server side state management, in contrast to client side, keeps all the information in user memory. The downside of this is more memory usage on server and the benefit is that users' confidential and sensitive information is secure.
   

1. Client side state management techniques

·                  1. View State
·         2. Control State
·         3. Hidden fields
·         4. Cookies
·         5. Query Strings

2. Server side state management techniques

·            1. Application State
·         2. Session State








No comments:

Post a Comment