我有多个要从视图传递到控制器方法的数组。为此,我将这些数组转换为 JSON 对象。然后,创建 AJAX 调用,但如何一次发送这些 JSON 对象?
var json_InstallationControl = JSON.stringify(array_installationControl);
var json_HardwareGUID = JSON.stringify(array_HardwareGUID);
var json_InstallAppID = JSON.stringify(array_InstallAppID);
var json_MACAddress = json.stringify(array_MACAddress);
$.ajax({
url: "@Url.Content("~/Home/ActivationManagement")",
type: "POST",
contentType: "application/json",
data: { jsonData: json_InstallationControl },
success: function(){
console.log('success!!');
}
})
[HttpPost]
public ActionResult ActivationManagement(String jsonData)