Different between view and sessions?

I want to know what is the difference between view and sessions. thanks

+2


a source to share


2 answers


Viewstate maintains state through postbacks and therefore can hold the state of controls on the page, etc.



Session saves data in the entire user session and therefore can store data that needs to be stored for a longer time (for example, a shopping cart)

+4


a source


The ViewState is injected into the form and sent to the browser and then submitted as part of the form back to the server. The session is constantly on the server.



0


a source







All Articles