0

I have a web service that goes out to Cognos and returns me a byte array of data. What I would like is to have this byte array rendered into a popup window. Currently, the app uses the web service, gets back a byte array and we do this with the following:

byte[] results = new byte[] { };

// web service call returns results for a pdf file

Response.Clear();


                   Response.AddHeader("content-disposition", String.Format("attachment; filename={0}{1}", txtFileId.Text,fileExt));
        Response.BinaryWrite(results);

        Response.Flush();
        Response.End();

This brings up the file open/save dialog. The user would like it to open in some new popup window. Any ideas on how to accomplish this? Thanks.

Kathy Lori
  • 487
  • 6
  • 21
  • 1
    Possible duplicate of [How can I open a link in new tab (and not new window)?](http://stackoverflow.com/questions/6296013/how-can-i-open-a-link-in-new-tab-and-not-new-window) – Liam Aug 10 '16 at 14:53
  • I was able to get a new browser window to open with this, but I would like to be able to set the size of the browser window: Response.AddHeader("content-disposition", String.Format("inline; filename={0}{1}", txtFileId.Text, fileExt)); Response.AddHeader("content-type","application/pdf"); – Kathy Lori Aug 10 '16 at 16:12

0 Answers0