As the title says, I want to mark a property as non serializable by the JavascriptSerializer. How can achive that ? Thanks in advance.
As of .NET 3.0, you can use DataContract instead of Serializable. With the DataContract though, you will need to either "opt-in" by marking the serializable fields with the DataMember attribute; or "opt-out" using the IgnoreDataMember.
The main difference between opt-in vs opt-out is that opt-out by default will only serialize public members, while opt-in will only serialize the marked members (regardless of protection level).
Note that if you are using Newtonsoft.Json for your serialization (like in my case), it supports DataContract as well.