Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
StoreEntityListInSession, Error: Type is not marked as S
Message
From
03/06/2011 16:12:19
Timothy Bryan
Sharpline Consultants
Conroe, Texas, United States
 
 
To
03/06/2011 15:28:51
Don Harris
Iu Athletics Computer Services
Indiana, United States
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Miscellaneous
Thread ID:
01512775
Message ID:
01512776
Views:
41
Hi Don,


>Hi All,
>
> MM.Net v.4.0
> Visual Studio 2010.
> Web Application
>
>
>I am trying to use the StoreEntityListInSession method for the first time and when I debug, I get the error:
>
>Type 'BizObjEntity' in Assembly 'BizObjProj', Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' is not marked as serializable.
>
>I'm calling it from the myButton_Click method of a button on a webform.
>
>I get no compile errors at all. Here is what it looks like:
>
>
>        protected void btnMoveToNewYear_Click(object sender, EventArgs e)
>        {
>            AthlEligMovStudToNewYr movRes = new AthlEligMovStudToNewYr(sourceyear, targetyear);
>            this.oAthlEligibility.EntityList = movRes.CarryForwardIsYes;    //this is an mmBindingList
> 
>            StoreEntityListInSession<AthlEligibilityEntity>(this.oAthlEligibility.EntityList, "CarryForwardIsYes");
>
>//Also, I have tried this with the same results:
>
>            StoreEntityListInSession<AthlEligibilityEntity>(movRes.CarryForwardIsYes, "CarryForwardIsYes");
>        }
>
>
>
>Can anyone see what I'm missing?
>
>Thanks,
>Don
>
>Ps. Also, if I've goofed up the posting of this message in any way, alert me. I'm not
>finding Universal Thread to be intuitive or maybe it's just so powerful that it takes
>a while to acclimate to.

In the earlier version of MM which you started with it did not have the Serializable attribute on the ABusinessEntity class. That has been fixed, but yours probably doesn't have that. Just open the ABusinessEntity class file and add "Serializable right over the class definition. It needs to be surrounded with a square brackets and no quotes. Capitalize the S in Serializable.

Update: A picture is worth a thousand words. Attached.

That should fix your issue.
Good luck
Timothy
Timothy Bryan
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform