Quantcast
Channel: ASP.NET AJAX + Ajax Control Toolkit (ACT)
Viewing all articles
Browse latest Browse all 5678

How to post a file in an Ajax call to controller

$
0
0

Hi

I have a Main.cshtml which renders another partial view as below.

<div>@{Html.RenderPartial("FileUploadPopUp", Model.model1);}</div>

In the FileUploadPopup.cshtml as below I need to upload an Excel file.

<form><input type="file"><input type="button" value="Save" id="btnSave"></form>

In the Main.cshtml, I need to make an Ajax call to post the file as below.

$("#btnSave").click(function

() {  //Here need to make Ajax call to post the Excel file,

     //Could you please give me code how can I do it. 

}

Thank you,

Best regards,

Joseph


Viewing all articles
Browse latest Browse all 5678

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>