开发者

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

开发者 https://www.devze.com 2023-03-06 16:41 出处:网络
Byte[] results = reportviewer.LocalReport.Render(\"PDF\"); Response.ContentTyp开发者_如何学Ce = \"Application/pdf\";
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

精彩评论

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