I think I found it :D, wrong data 😀 – steve jobs
I have a datatable object I want to store it in Viewstate but some times an error occurred (not usual
Error: Sys.WebForms.PageRequestManagerServerErrorException: Error serializing value 'Table1' of type 'System.Data.DataTable.'
Any help Please
The problem that you are facing is because of size of datatable.
Storing datatable in ViewState is not a good practice as it increases the size of your page and reduces the performance, also ViewState can be deciphered on the client side, so the DataTable is not secure.
You can do it through sessions or more better from Cache and if it is not being used frequently I suggest you to requery it from database.