ASP.net C # Multiple Documents for One Response Object

I have this code

private void writeReport(IReport report, string reportName)
{
    string reportString = report.makeReport();
    ASCIIEncoding encoding = new ASCIIEncoding();
    byte[] encodedReport = encoding.GetBytes(reportString);
    Response.ContentType = "text/plain";
    Response.AddHeader("Content-Disposition", "attachment;filename="+ reportName +".txt");
    Response.OutputStream.Write(encodedReport, 0, encodedReport.Length);
    Response.End();
}

but I have 3 documents that I need to send to the client. I do not want the user to press 3 buttons to get 3 txt files. Is there a way to send all 3 responses?

+5
source share
2 answers

No, multi-user attachments for download (for example, by email) are not supported for security reasons. It was called a "downloadable download."

Please note that Gmail handles this by dynamically rewriting files. You must too. http://forums.asp.net/t/1240811.aspx

+6
source

" HTTP-" motobit.com.

, HTTP, .

+2

All Articles