Both are used as a way to store information pertinant to a specific user in context of a web application/website.Cookies are persistant, however, and can be used even after the browser is shut down....
Cookies:1) Cookies can hold small amount of data in text format.2) Cookies created on browser.3) Cookies can be disabled by user computer.Session: 1) Session can hold large amount of data. 2) Session created on the Server.3) Session can not be disabled by user computer.
View state is stored on page(base 64 encoded). In addition a hash is created using MAC key which is added to view state data and resulting string is stored on page.Hidden variables doesn't render ...
View state variables stores the value for a single page, it a client side browser, session is a server side variables. It stores the value for the full project.