I have an AJAX form that submits correctly and that sends a complete model into the controller. What I want is to add a JSON to be sent with the Request. I have managed to intercept the POST like this:
$(document).ready(function() {
$("form").submit(function(e) {
if (e.originalEvent.explicitOriginalTarget.id == "submit") {
}
});
What I don't know is how to send my JSON data, while also keeping the data sent initially on the form submission. I had a thought at adding a hidden field, setting its value to the JSON string and then de-serializing it on the server, but that seems rather wrong.