新しいブラウザ ウィンドウに出力ストリームを書き込むにはどうすればよいですか?
現在、私は以下のコードを持っています。明らかに、同じウィンドウでストリームを開きます。出力ストリームをファイルに書き込んで新しいウィンドウで開くことができることは知っていますが、それはオプションではありません。
protected void openPDF(byte[] dados) {
HttpContext contexto = HttpContext.Current;
contexto.Response.Clear();
contexto.Response.AppendHeader("content-type", "application/pdf");
contexto.Response.AppendHeader("Expires","Mon, 26 Jul 1990 05:00:00 GMT");
contexto.Response.AppendHeader("Cache-Control","no-cache, must-revalidate");
contexto.Response.AppendHeader("Pragma","no-cache");
contexto.Response.Expires = -1;
contexto.Response.AppendHeader("Content-Disposition", "inline; filename=labels.pdf");
contexto.Response.AddHeader("content-length", dados.Length.ToString());
contexto.Response.OutputStream.Write(dados, 0, dados.Length);
contexto.Response.OutputStream.Flush();
contexto.Response.End();
}