jQuery ajax call to httphandler returning zip file
I have an httphandler that creates a zip file and returns it for download.
context.Response.Appe开发者_运维技巧ndHeader("content-disposition", "attachment; filename=myfile.zip");
Is it possible to call the handler from a jquery ajax call? If yes, what kind of dataType should I declare?
Thanks
What I would suggest here is not to return the ZIP file through Ajax, but create it and return a link to it (or the error message). Then you can process the response and either show the error or allow the user to download from the link.
精彩评论