Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ViewState vs cookies vs cashing vs sessions

Tags:

.net

asp.net

When we are using ViewState or cookies or cashing or sessions where are we storing the information? I know when we use sessions we can store data in sql server or web server. is there any other way we store data when we are using sessions.

One more questions when i get the data from sql server and bind it to the dataset or datatable where that data is going to store(the dataset records)?

like image 996
Philly Avatar asked Nov 05 '22 05:11

Philly


1 Answers

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

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

You can see details here : http://msdn.microsoft.com/en-us/library/ms178586.aspx

like image 179
Antonio Bakula Avatar answered Nov 10 '22 16:11

Antonio Bakula