Here is my Action Mehtod
public JsonResult GetById(IEnumerable<Guid> idList)
{
//.....
}
And my JavaScript . I'm making an array of strings using li element's id property
var idArr = [];
var list = $("#ulApplications li");
$.each(list, function () { idArr.push($(this).attr("id")) });
$.ajax(
{
type: "GET",
url: "/rolemanagement/application/GetById/",
contentType: false,
datatype: "json",
data: { 'idList': idArr },
success:........
On my Action method I'm not getting any data.It seems I'm Missing something. thanks
I tried out the below code which seems to be working fine,
which already given by @stephen where even stringify is not even required to send the data.
Change your ajax to
After searching on stackoverflow and other blogs. I found a solution which is working for me, although above given answers are closely correct but they didn't worked for me. Here is my answer