![]() ![]() Once you have marked every single class associated as serializable, then this error will go away.īelow is a sample of how to do that in both VB.Net and C#. Be aware that if your class/object has other custom class/object's nested inside it, all the "nested classes" used must also be serializable. In the code, you need to flag the class/object as “Serializable”. Share Improve this answer Follow answered at 9:06 Aliostad 79. Put the full error stack if you need more help. The real detail could be deep 4-5 levels but is always descriptive enough to find out what is wrong. To fix this problem, you have to update the code of the class/object that you are attempting to store into the ViewState. 1 With serialisation errors, you need to see the inner exception for the actual detail. Although you will see the resulting error on your webpage, if you try to run your code in debug mode, a ViewState serializing error doesn’t cause a “halt” in code for you so see where the error is happening. If you place an object into the ViewState which is not serializable, then an error will occur. ViewState requires that all objects placed within it are serialized.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |