I am trying to display a PDF file (which I am being passed from a web service as a binary stream) in a browser, but I am being prompted to save the file instead. I don't want the user to be prompted; I just want the PDF to be displayed. Here is the code:
Dim binaryData() As Byte
binarydata = GetDataHere()
Response.ContentType = "application/pdf"
Response.BinaryWrite(binar
yData)
Response.End()
I also tried adding Response.Flush() and Response.Close() just for good measure, but it didn't help.
I'm using ASP.NET. Any ideas?
Start Free Trial