How to set the name of the file when streaming a Pdf in a browser?
问题 Not sure exactly how to word this question ... so edits are welcomed! Anyway ... here goes. I am currently use Crystal Reports to generated Pdfs and just stream the output to the user. My code looks like the following: System.IO.MemoryStream stream = new System.IO.MemoryStream(); stream = (System.IO.MemoryStream)this.Report.ExportToStream(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat); this.Response.Clear(); this.Response.Buffer = true; this.Response.ContentType = "application