I finally got my application to work where on a blank page a pdf will open (the pdf is being brought out of a database as a ole object). The only problem I have having now is the fact that it opens in a acrobat window and leaves the ie window blank, so you have two windows open. How can I make it open within IE??
Here is my code.
If rd.Read() Then
Dim filename As String
Dim filesize As Integer
Dim contenttype As String
filename = rd.GetString(0)
filesize = rd.GetInt32(1)
contenttype = rd.GetString(2)
Dim filedata(filesize) As Byte
rd.GetBytes(3, 0, filedata, 0, filesize)
If (forceDownload) Then
Response.AppendHeader("Content-Disposition", "attachment; filename=" + filename)
Response.AppendHeader("Content-Disposition", "inline; filename=" + filename)
Response.ContentType = contenttype
Response.OutputStream.Write(filedata, 0, filedata.Length)