ViewState vs. Cookies vs. Cash vs. Sessions

When we use ViewState or cookies or cash or sessions, where do we store information? I know when we use sessions, we can store data on sql server or web server. Is there any other way to store data when using sessions.

Another question, when I get data from sql server and bind it to a dataset or datatable, where will this data be stored (dataset records)?

+4
source share
1 answer

Viewstate is stored in the created html (hidden field), the cache is stored in memory, but with the Output-cache provider you can create custom storages for cached data, see here: http://msdn.microsoft.com/en-us/library/ms178597 .aspx

Session data is also stored by default in memory (inproc), but you can use an Sql server or a public server as storage for session data. If you use State Server, the session data is again stored in memory, but in a different process, so the state server session data may survive a reboot of your web application.

Here you can see the details: http://msdn.microsoft.com/en-us/library/ms178586.aspx

+2
source

Source: https://habr.com/ru/post/1396941/


All Articles