I need to post a form on C# server-side using Javascript. I am using the following code
$("#Form").submit(function () {
$.ajax({
url: 'NewRequest',
data: $(this).serializeArray(),
type: 'post',
success: function (data, status, xhr) { alert("Dinesh"); },
dataType:'json',
});return false;
});
I have an attachement with other text fields in HTML
<form role="form" id="Form" method="post" enctype="multipart/form-data" > <input type="file" name="Attachment" id="Attachment" multiple="multiple" /></div> </form>
All the fields are being picked up while debugging but no the attachment one. Please help