Reputation: 5817
What I understand is, the objects should be marked as serializable if we use a ViewState to keep it. I am curious about where the serializable object is kept before assigned to the ViewState? Can I change the serialize method while assigning a object to a viewstate ?
Upvotes: 0
Views: 127
Reputation: 148150
The view state is serialized to the hidden form field in the Page class's SavePageStateToPersistenceMedium() method during the save view state stage, and is deserialized by the Page class's LoadPageStateFromPersistenceMedium() method in the load view state stage. With just a bit of work we can have the view state persisted to the Web server's file system, rather than as a hidden form field weighing down the page. To accomplish this we'll need to create a class that derives from the Page class and overrides the SavePageStateToPersistenceMedium() and LoadPageStateFromPersistenceMedium() methods.
For detailed article please visit here
Upvotes: 1