ASP.NET provides several techniques for storing state information on the client. These include the following:
- view state ASP.NET uses view state to track values in controls between page requests. It works within the page only. You cannot use view state value in next page.
- control state: You can persist information about a control that is not part of the view state. If view state is disabled for a control or the page, the control state will still work.
- hidden fields: It stores data without displaying that control and data to the user’s browser. This data is presented back to the server and is available when the form is processed. Hidden fields data is available within the page only (page-scoped data).
- Cookies:Cookies are small piece of information that server creates on the browser. Cookies store a value in the user’s browser that the browser sends with every page request to the web server.
- Query strings: In query strings, values are stored at the end of the URL. These values are visible to the user through his or her browser’s address bar. Query strings are not secure. You should not send secret information through the query string.