Forcing response.binarywrite() to open in the same frame

D

Dan Kimhi

I am using the following code to open a CrystalReport object (cr) as a pdf
page :

Dim s As System.IO.MemoryStream =
cr.ExportToStream(CrystalDecisions.[Shared].ExportFormatType.PortableDocFormat)
With Response
.ClearContent()
.ClearHeaders()
.ContentType = "application/pdf"
.BinaryWrite(s.ToArray)
.End()
End With

The above opens in a separate frame. If, for example, I change the
..BinaryWrite to .Write("test"), it opens at the current frame. How could I
enforce the previous to always open in the current frame, and not open a new
window to show the .pdf stream.

Thank you for your help,


Dan Kimhi
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,001
Messages
2,570,254
Members
46,850
Latest member
VMRKlaus8

Latest Threads

Top