Before starting the topic let us understand why we need state management?
Q. Why State Management?
Q. Why State Management?
Ø When a page is submitted to the server, a page instance is
created. Then the server gathers all the information and prepares the output for
the browser, and then it Renders to HTML and sends the response back to the
browser. At that point, the page instance is destroyed on the server.
Ø So when we send the next request to the server; it will
start from the initial because the old value is not available on the server.
Definition:-
¢
State Management is the process of maintaining the state of
values between multiple requests of the page.
¢
So ASP .NET provides several techniques to store the value
either in the Client Machine or in the Server.
Types:-
It
is of 2 types based on storing the data; data can be stored in the client machine or in the server machine.
i.e. Client Side State Management and Server Side State Management.
Client-Side State Management:-
When we maintain(store) the data in the client machine then this is called Client-side State management.
we can maintain it in several ways, those are:-
- Hidden field
- Query string
- View state
- Cookies
Server-Side State Management:-
When data is maintained in the Server machine then it is cammed Server-side State management.
server-side state management are:-
- Session state
- Application state
For Client-Side state management Click Here.