Yassin,
>I have a business object which I am trying to save in a ViewState but getting the following message
>Error serializing value 'ACELO.OSP.BUSINESS.Schools' of type 'ACELO.OSP.BUSINESS.Schools.' ---> System.ArgumentException: Error serializing value 'ACELO.OSP.BUSINESS.Schools' of type 'ACELO.OSP.BUSINESS.Schools.' ---> System.Runtime.Serialization.SerializationException: Type 'ACELO.OSP.BUSINESS.Schools' in Assembly 'Acelo.OSP.Business, Version=1.0.2774.15076, Culture=neutral, PublicKeyToken=null' is not marked as serializable. at
By default, the business object is not marked as serializable, because typically you want to serialize the entity object--not the business object (which IS marked as serializable).
Best Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com