State Management is asp.Net Web Form
State Management:
HTTP is stateless Protocol, or we can say that our website is based on Stateless Protocol. Stateless means. Here State is Not in Managing Form. Basically, it means if we have a form which has some Fields like textboxes and radio buttons and other things. If we sent the values from one page to another. The data will be lost.
§ State is not manageable.
§ Values are not manageable.
That’s why we say it is stateless so managing the state is Necessary required. We had seen that Some Time Values are gated to another page. Because of State Management.
v There are two type of State Management
1. Client Side State Management
2. Server Side State Management
v 1.Client Side State Management
o Hidden Field.
o View State.
o Cookies
o Control State.
o Query String.
v 2.Server Side Client Management.
o Session
o Application.
v Client Side State Management.
1) Hidden Field: - This technic highly used in asp.net. Hidden fields are input control with a hidden type that stores hidden data in asp.net. We can store values into a hidden field.
2) View State: - View State is a method which saves the value of the page and controls between round trips. It is a page level State Management Technique.
3) Control State: - When we building custom controls we should use the control state to save the state.
4) Cookie: -the cookie stores their values in user’s Browser. And browser sent them back to the server side every time when request perform.
a. Persistence Cookie: -This types of Cookies stores on user’s Hard Drive. Cookies which have expired date and time are known as persistence cookie. It will store on user’s hard drive till we set the date and time.
b. Non-persistence cookie: - This kind of cookies are not stored permanently on user’s hard drive. When the user closes the browser the cookie will automatically delete.
5) Query String: -It is the state which Stores in the URL that is sent to the Browser.
- . Hidden Field : -
View State: -
c
3. Cookie: -
Example:1
Example 2.
4. Query String: -
Server Side State Management.
a. Application State
It is stored in the memory of the server. Which retrieve data faster from the database. session state is limited to the single user.
But application state is for all user and the session.
b. Session State.
· It is the context of a .net method it keeps track of the user during HTTP request. It is used to Store the values on the server.
· It is a very strong technic to maintain state.
· Generally we can say that it is used to store the user’s information.
· The server maintains the state of user’s information by using session ID.
· When a user sends a request without session ID ASP.NET creates a session ID and sends it with every request and response to the same user.
























Sir session no program muko
ReplyDelete