Posted on: 6/10/2014 11:11:41 PM | Views : 462

Hello everyone, I am trying to pass an array from my jquery to my web method. But keeps throwing internal server error. I believe there is a syntax error with the way I pass the array. Here is the code:
$("#button1").click(function () { var u_id = $('.Id').text(); var qty = $('#txtQty').val(); var values = []; $(".chb input:checked").each(function () { values.push(this.value); }); var argument = "{'id':'" + u_id + "','qty':'" + qty + "','checklist':'" + values + "'}"; $.ajax({ type: 'POST', contentType: "application/json; charset=utf-8", url: 'default.aspx/test', data: argument, ... }); }); Here is my web method:
& ...

Go to the complete details ...