I think simply marking your Group
class as serializable
would make your code work, as the ViewState
needs the class to be serializable
to store it. For details about serialization you can visit this link. Add [Serializable]
attribute to your class as following:
[Serializable]
public class Group
{
//properties
}
Hope this helps.