Unable to download generated PDF when controller action is called from Ajax [duplicate]
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}
0
This question already has an answer here:
Download a file by jQuery.Ajax
17 answers
I am returning FilestreamResult from controller I tried both way jquery and ajax but cant succeed for download pdf/xlsx file from controller. Controller: var filestream = new FileStream(pdfoutputpath + ".pdf", FileMode.Open); return new FileStreamResult(filestream, "application/pdf"); View code using jquery: function downloadpdffile(id) { $(".popup-overlay, .popup-content...