var dataToSend = new FormData(); dataToSend.append('file', document.getElementById("myFile").value); dataToSend.append('text', document.getElementById("biddername").value); $.ajax({ type: "POST", url: "SupplierMaster.aspx/RegisterSupplier", data: dataToSend, processData: false, contentType: false, dataType: false, async: true, success: function (data, status) { console.log("CallWM"); alert(data.d); }, failure: function (data) { alert(data.d); }, error: function (data) { alert(data.d); } }); }
[WebMethod] public static string RegisterSupplier(HttpPostedFile file, string biddername) { return "a"; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)