How can I prevent the "Self-referencing loop detected" error while serialising the object in MVC View ?
var fieldDependants = @Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(Model);
I added following configuration snip in Global.asax But still getting the same error.
config.Formatters.JsonFormatter
.SerializerSettings
.ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Ignore;
Thanks