I would like to use standard ASP.NET file download response, like in other Stack Overflow question.
Response.ContentType = \"application/octet-stream\";
Respo
You need to have this in a separate aspx that does not use ajax. Ajax is updating existing html markup on a page at the client side. What you try here is replace the responce content on the server side before sending anything to the client.
You could try this:
Have a page called Download.aspx
that contains the transmit code you already have.
In your original page, you have a javascript call that calls the download page like this:
window.location.replace('Download.aspx');