I was looking at this article from 2005 and wanted to get some thoughts on it, advantages and disadvantages that the article does not point out about ViewState and Cache?
http://www.codersource.net/asp_net_viewstate_versus_data_caching.aspx
I was looking at this article from 2005 and wanted to get some thoughts on it, advantages and disadvantages that the article does not point out about ViewState and Cache?
http://www.codersource.net/asp_net_viewstate_versus_data_caching.aspx
ViewState is used per-user, you don't store a ViewState to use on another use. A Cache is "global" and is accessed by all users, depending on how you Index the Cache of course.
I use both ViewState and Cache on a lot of my sites because ViewState handles when i postback stuff with my gridviews and such and the Cache is used for Chaching everything that is partially or fully static.
That article is poor - why confuse the Cache and Viewstate in the same article? It's like saying 'in this article I compare the car and the can opener... conclusion: choose which best suits your needs'. I would ignore that for starters.
For most users starting out with ASP.NET, viewstate can be completely disabled. Here is a proper article explaining Viewstate (and more generally the page lifecycle):
http://msdn.microsoft.com/en-us/library/ms972976.aspx
Caching on the otherhand is an essential technique for improving performance of both individual page requests and a site as a whole.