开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜