State Management:
State management is the process used to manage the state of an object. There are two types of state management process which is important and used by every web applications. These two states are:
- Client Side
- Server Side
Client Side: It is used to store information on the client. Following are the techniques used to store information on the client side. These are:
View state: It is used to store user's data. It works within the page only. It is used where user wants to used the information temporarily after the postback.
Control state: It is used to enable view state property. It cannot be modified, accessed directly or disabled. It is also used for defining a custom view.
Hidden fields: It stores small amount of data and it is invisible in the browser.
Cookies: Cookies are small piece of information that server creates on the browser and also stored in the client's hard disk. Cookies are of two types:
Persistent cookies: Cookies having expiration date and stores permanently is known as peristent cookies.
Non-persistent cookies: Non persistence cookies are not stored permamnently. It maintains user information as long as the user accesses the same browser.
Query strings: It stores the value in the URL. These values are visible to the user. Query strings are not secure. You should not send secret information through the query string.
Server Side: It is used to store information on the server. It is futher divided into:
Application State
Session State: It is further divided into:
- InProc: This is the default state management, stores session in the memory on the web server.
- StateServer: Stores session state in a separate process called the ASP.NET state service.
- SqlServer: Stores session state in a SQL Server database.
- Custom mode: Enables to specify a custom storage provider.
- Off mode: Disables session state.
0 Comment(s)