When I try to initialize ViewState key with value of type Group class it throws the following exception:

exception: **Exception of type 'System.Web.HttpUnhandledException' was thrown.Error serializing value 'MMS.Classes.DBEntities.Group' of type 'MMS.Cl.Entities.Group.'** 

code: 

```
protected void Page_PreRender(object sender, EventArgs e)
        {
            Controls();
        }

        private void Controls()
        {
            if (!Page.IsPostBack)
            {
                ViewState["Group"] = new Group();
                ViewState["Group"] = new List<string>(); // if I use this line instead the above it works works
            }
        }

```