I am sending a file with HttpContext.Current.Response
I need to loop through, create a file, send it to the browser for download. Then create another file and send it to the browser for download.
On the second one I get an error:
Server Cannot Append Header After HTTP headers have been sent Exception
So I added this:
and now get this error:
Server cannot clear headers after HTTP headers have been sent.
Any solutions for sending multiple files without intervention from the user? (someone said to put a button for each file, that is not an option, as we are sending a file for every 100 pages as an example and don't know how many files we might have and we could be spamming a ton of buttons to the screen and making them click them all and remember which one they clicked).
Someone else suggested zipping up the files, but due to most of our clients not being allowed to install on their machines and people all fretting over viruses in zip files, the boss does not see that as a solution.
What solutions do you recommend that you have used?