I'm trying to add a button to a grid that opens a "converted" pdf file in code behind. Everything seems to be working as far as creating the bytes but nothing opens.
code: pdfFile does have results because I saved it locally just to make sure. It just won't open.
code: pdfFile does have results because I saved it locally just to make sure. It just won't open.
Dim DocumentServiceWS As New DocumentServices
Dim pdfFile As Byte()
pdfFile = DocumentServiceWS.GetDRDocumentPDF(_PRO, _DocType)
If Not (pdfFile Is Nothing) Then
Response.Buffer = True
Response.Clear()
Response.ContentType = "application/PDF"
Response.AddHeader("Content-Disposition:", "attachment; filename=Result.pdf")
Response.BinaryWrite(pdfFile)
Response.Flush()
Response.End()
End If