Skip to main content
replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link
URL Rewriter Bot
URL Rewriter Bot

You need to set traditional: true when serializing arrays.

$.ajax({
type: "POST",
traditional: true,
url: "../BookOrder/MyMethod2",
data: { function_param: SelectedIDs}

});

Found this good explanation on what traditional: true does: http://stackoverflow.com/a/5497151/2419531https://stackoverflow.com/a/5497151/2419531

If you don't want to use traditional: true, you can pass the data as string using JSON.stringify and specifying the contentType:

$.ajax({
type: "POST",
url: "../BookOrder/MyMethod2",
contentType: 'application/json',
data: JSON.stringify({function_param: SelectedIDs}),

});

You need to set traditional: true when serializing arrays.

$.ajax({
type: "POST",
traditional: true,
url: "../BookOrder/MyMethod2",
data: { function_param: SelectedIDs}

});

Found this good explanation on what traditional: true does: http://stackoverflow.com/a/5497151/2419531

If you don't want to use traditional: true, you can pass the data as string using JSON.stringify and specifying the contentType:

$.ajax({
type: "POST",
url: "../BookOrder/MyMethod2",
contentType: 'application/json',
data: JSON.stringify({function_param: SelectedIDs}),

});

You need to set traditional: true when serializing arrays.

$.ajax({
type: "POST",
traditional: true,
url: "../BookOrder/MyMethod2",
data: { function_param: SelectedIDs}

});

Found this good explanation on what traditional: true does: https://stackoverflow.com/a/5497151/2419531

If you don't want to use traditional: true, you can pass the data as string using JSON.stringify and specifying the contentType:

$.ajax({
type: "POST",
url: "../BookOrder/MyMethod2",
contentType: 'application/json',
data: JSON.stringify({function_param: SelectedIDs}),

});

added 16 characters in body
Source Link
Brijesh
  • 362
  • 7
  • 17

You need to set traditional: true when serializing arrays.

$.ajax({
    type: "POST",
    traditional: true,
    url: "../BookOrder/MyMethod2",
    data: { function_param: SelectedIDs}
});

});

Found this good explanation on what traditional: true does: http://stackoverflow.com/a/5497151/2419531

If you don't want to use traditional: true, you can pass the data as string using JSON.stringify and specifying the contentType:

$.ajax({
    type: "POST",
    url: "../BookOrder/MyMethod2",
    contentType: 'application/json',
    data: JSON.stringify({function_param: SelectedIDs}),
});

});

You need to set traditional: true when serializing arrays.

$.ajax({
    type: "POST",
    traditional: true,
    url: "../BookOrder/MyMethod2",
    data: { function_param: SelectedIDs}
});

Found this good explanation on what traditional: true does: http://stackoverflow.com/a/5497151/2419531

If you don't want to use traditional: true, you can pass the data as string using JSON.stringify and specifying the contentType:

$.ajax({
    type: "POST",
    url: "../BookOrder/MyMethod2",
    contentType: 'application/json',
    data: JSON.stringify({function_param: SelectedIDs}),
});

You need to set traditional: true when serializing arrays.

$.ajax({
type: "POST",
traditional: true,
url: "../BookOrder/MyMethod2",
data: { function_param: SelectedIDs}

});

Found this good explanation on what traditional: true does: http://stackoverflow.com/a/5497151/2419531

If you don't want to use traditional: true, you can pass the data as string using JSON.stringify and specifying the contentType:

$.ajax({
type: "POST",
url: "../BookOrder/MyMethod2",
contentType: 'application/json',
data: JSON.stringify({function_param: SelectedIDs}),

});

You need to set traditional: true when serializing arrays.

$.ajax({ type: "POST", traditional: true, url: "../BookOrder/MyMethod2", data: { function_param: SelectedIDs} });

$.ajax({
    type: "POST",
    traditional: true,
    url: "../BookOrder/MyMethod2",
    data: { function_param: SelectedIDs}
});

Found this good explanation on what traditional: true does: http://stackoverflow.com/a/5497151/2419531

If you don't want to use traditional: true, you can pass the data as string using JSON.stringify and specifying the contentType:

$.ajax({ type: "POST", url: "../BookOrder/MyMethod2", contentType: 'application/json', data: JSON.stringify({function_param: SelectedIDs}), });

$.ajax({
    type: "POST",
    url: "../BookOrder/MyMethod2",
    contentType: 'application/json',
    data: JSON.stringify({function_param: SelectedIDs}),
});

You need to set traditional: true when serializing arrays.

$.ajax({ type: "POST", traditional: true, url: "../BookOrder/MyMethod2", data: { function_param: SelectedIDs} });

Found this good explanation on what traditional: true does: http://stackoverflow.com/a/5497151/2419531

If you don't want to use traditional: true, you can pass the data as string using JSON.stringify and specifying the contentType:

$.ajax({ type: "POST", url: "../BookOrder/MyMethod2", contentType: 'application/json', data: JSON.stringify({function_param: SelectedIDs}), });

You need to set traditional: true when serializing arrays.

$.ajax({
    type: "POST",
    traditional: true,
    url: "../BookOrder/MyMethod2",
    data: { function_param: SelectedIDs}
});

Found this good explanation on what traditional: true does: http://stackoverflow.com/a/5497151/2419531

If you don't want to use traditional: true, you can pass the data as string using JSON.stringify and specifying the contentType:

$.ajax({
    type: "POST",
    url: "../BookOrder/MyMethod2",
    contentType: 'application/json',
    data: JSON.stringify({function_param: SelectedIDs}),
});
Source Link
Brijesh
  • 362
  • 7
  • 17
Loading