Example:

c)Cookies: Cookies store a value in the user's browser that the browser sends with every page request to the same server. Cookies are the best way to store state data that must be available for multiple Web pages on a web site.

Server – Side State Management

a)Application State:Application state is stored in memory on the server and is faster than storing and retrieving information in a database. Application state is a useful place to store small amounts of often-used data that does not change from one user to another.

Example:Application["noVisitors"] = 1; // set value in the field name noVisitors

b)Session State: ASP.NET Session state provides a place to store values that will persist across page requests. Values stored in Session are stored on the server and will remain in memory until they are explicitly removed or until the Session expires.

Example:

Session["emailid"] = "abc@gmail.com"; // set value in the session field

string email = Session["emailid"].ToString(); // get value from the session field