I'm getting the following error: "Type 'System.Data.Linq.ChangeTracker+StandardChangeTracker' in Assembly 'System.Data.Linq, Version=18.104.22.168, Culture=neutral, PublicKeyToken=b77a5c561934e089' is not marked as serializable."
Basically, I have a LINQ entity class built from LINQ to SQL called City, which implements INotifyPropertyChanging and INotifyPropertyChanged that I'm trying to store in ViewState. When I remove these interfaces from the class, the error goes away. When left on, the error is there.
I know that these interfaces are what enable the DataContext object's to track changes and persist those changes to the database using the dc.SubmitChanges() method. Is there anything that I need to do to be able to enable storing a LINQ to SQL object in ViewState? I thought I read that this was possible, and that Asp.net allowed persisting changes like that across post-backs.
View Complete Post