file download by calling .ashx page

故事扮演 提交于 2019-11-27 14:48:56
Aristos

Your file is downloading, but you get it on javascript, on the data parameter of your call because you call it with Ajax.

You use a handler - so ajax not needed here, and the most easy thing to do using javascript is that:

window.location = "FileDownload.ashx?parametres=22";

or with a simple link as

  <a target="_blank" href="FileDownload.ashx?parametres=22" >download...</a>

Ah, and send the parameters via the url, you can not post them that way.

You can also read: What is the best way to download file from server

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!