You're on the right track, but you'll also need to use
Page.ClientScript.RegisterStartupScript.
e.g. user clicks a "show document" button.
On server side, use ClientScript.RegisterStartupScript to register the
javascript which you want to automatically run on the client.
Write the javascript so that it opens a new brower window (using window.open
etc) at the new page which you will use to display the PDF.
On the new PDF page, do something like this to display the PDF in the
Page_Load event :
byte[] data = ... fill with PDF data
Response.Clear();
Response.ContentType = "application/pdf";
Response.BinaryWrite(data);
Response.End();
"H. Rodriguez" <hr********@hotmail.comwrote in message
news:aa******************************@giganews.com ...
Hello,
I would like to be able to open a new IE window on the client side and
display a PDF document in the new window. Many tutorial sites that I have
checked suggest opening a new IE window using client-side JavaScript and
the window.open() function. I suspect this is not the desired way as I
would like to output a PDF report from a byte array to the HTTP output
stream to this new window.