Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
StoreEntityListInSession, Error: Type is not marked as S
Message
De
03/06/2011 16:59:56
Don Harris
Iu Athletics Computer Services
Indiana, États-Unis
 
 
À
03/06/2011 16:12:19
Timothy Bryan
Sharpline Consultants
Conroe, Texas, États-Unis
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Divers
Thread ID:
01512775
Message ID:
01512781
Vues:
34
Thanks Tim,
For some reason, it didn't work when I corrected ABusinessEntity but I added [Serializable] to the
Entity class of the BizObj I was working with and hallelujah.

Don

>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform