Click here to Skip to main content
15,891,841 members

Response to: Pros and Cons of Session state and View state in SharePoint webpart

Revision 4
I use ViewState all the time.

And it works good, PROVIDED that the SIZE of the data is "reasonably bounded" for the given network-access scenarios.

So the question is, "HOW BIG?" is the data when PERSISTED to the ViewState hidden field? If this is "too big" or not depends primarly upon network conditions; the ultimately issue with ViewState isn't that it must be downloaded, but rather that it must be sent BACK with each request - and connections are sometimes asymmetric in performance.

Just avoid using a DataTable as the default Serialization it has works poorly with the serializer used in ASP.NET (which is quite efficient for primitive structure trees and collections that don't muck with a custom serialization).
Posted 27-Sep-12 13:05pm by pstickne.