开发者

how to open pdf file in new window which is generated through reportviewer in C#.net

Byte[] results = reportviewer.LocalReport.Render("PDF");
Response.ContentTyp开发者_如何学Ce = "Application/pdf";
Response.OutputStream.Write(results, 0, results.Length);
Response.End();

here by using this code the report is opening in same browser as pdf file. but i want to open this pdf file in a new window. can u help me please..??


you can do a window.open('newwindow.aspx'); from java script and then in the new page write the code to export to PDF on page load. This is the easiest possible solution I can come up with right now.


Maybe in the presentation instead of a link like

<a href="/report">click me </a>

send it to target _blank

<a href="/report" target="_blank">click me </a>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜