i have list of objects :
var things = [];
var obj = {
ayah: line.ayah,
surah: line.surah,
verse: line.verse
};
things.push(obj);
$.ajax({
method: 'GET',
url: "Gateway/Inbound_Request_Handler?action=1",
data:things,
success: function (Data) {
var mera_obj = Data.key;
document.getElementById("Param2").value = '(' + mera_obj.Response_Code + ' , ' + mera_obj.Response_Description + ')';
},
error: function () {
alert("ERROR: can't connect to Server this time");
}
});
and class :
public class thing {
public int surah { get; set; }
public int ayah { get; set; }
public string verse { get; set; }
}
and here is controller method :
public class GatewayController : Controller
{
[HttpGet]
public ActionResult Inbound_Request_Handler(List<thing> things)
{...}
}
but its still showing that list in controller method is null. i don't know whats wrong with me ?