Hey guys, I am running into an issue at my job that I was hoping someone in this community could help me out with.
I have been tasked with fixing an issue a user control is having that someone else built. The user control is a filter control. It contains a filter control class that holds the raw data for the filter control. One of the members of the filter control is an Object DataSource. The page that contains the user control will make a call to add a control which in turn instantiates the filter control class. One of the arguments passed into the calling method is the object datasource which can be anything from a stored procedure to a list or a datatable returned from the data layer.
Initially the filter control class was stored in view state but then serialization issues started occuring. It was moved to session state where a random bug was reported that we were unable to recreate at our end. Also, as my understanding would have it serialization issues that occur in view state will also occur in session state since the object is still undergoing serialization. So I have been tasked with moving the object from session state and coming up with some other mechanism.
Here is the solution I came up with:
Mark the object DataSource property with the <nonserializable> attribute. Then either ser
View Complete Post