send json array to ashx handler
问题 I have this code, and when i'm executing it this keeps showing the same error: Invalid JSON primitive: titles. Client Side: var title = new Array(); ... for (var i = 0; i < names.length; ++i) { title[i] = '{ "titulo' + i + ':"' + names[i] + '"}'; } $("#gif").show(); $.ajax({ async: true, contentType: 'application/json; charset=utf-8', dataType: 'json', type: "POST", data: { titles: title }, url: "../handlers/saveUpload.ashx", success: function (msg) { $("#gif").hide(); } }); Server Side: