asp.net core mvc ajaxform submit files
<form id="form1" method="post" enctype="multipart/form-data" asp-controller="HardDisks" asp-action="ImportExcel"> <div class="fileupload btn btn-purple waves-effect waves-light"> <span><i class="ion-upload m-r-5"></i>Choose File...</span> <input class="upload" type="file" id="files" name="files" multiple /> </div> <button class="btn btn-default waves-effect m-b-5" type="button" onclick="funSubmit()" style="margin-top:5px;">Submit</button> <i class="md md-get-app" style="cursor:pointer" onclick="downdloadTemplate()"></i> </form> function funSubmit() { $("#form1").ajaxSubmit({ success: function (data) { alert(data); } }); }
Thanks & Best Regards!
Javi Zhu 朱佳辉
Mobile: 15900467108
Email: Javi.zhu@outlook.com