C# ASP.NET MVC – How to Mark a Property as Non-Serializable for JSON

asp.net-mvcc++

As the title says, I want to mark a property as non serializable by the JavascriptSerializer. How can achive that ? Thanks in advance.

Best Answer

I think you just want to apply the ScriptIgnoreAttribute:

[ScriptIgnore]
public string IgnoreThis { get; set; }
Related Question