473,486 Members | 2,429 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Show PDF in new window

With code behind I create a PDF-report and show it.

System.IO.MemoryStream ReportStream
= (System.IO.MemoryStream)crReportDocument.ExportToS tream(ExportFormatType.PortableDocFormat);
Response.ClearContent();
Response.ClearHeaders();
Response.ContentType = "application/pdf";
Response.BinaryWrite(ReportStream.ToArray());
Response.End();

The PDF is shown in the same window. How can I show the PDF in a new window?

Thanks in advance.
Nov 18 '05 #1
1 2701
If the aspx page sending the PDF is accessed using an anchor tag, then
giving target='_blank' for that tag would open in new window.

"Edward" <Ed****@discussions.microsoft.com> wrote in message
news:40**********************************@microsof t.com...
With code behind I create a PDF-report and show it.

System.IO.MemoryStream ReportStream
=
(System.IO.MemoryStream)crReportDocument.ExportToS tream(ExportFormatType.Por
tableDocFormat);
Response.ClearContent();
Response.ClearHeaders();
Response.ContentType = "application/pdf";
Response.BinaryWrite(ReportStream.ToArray());
Response.End();

The PDF is shown in the same window. How can I show the PDF in a new window?

Thanks in advance.
Nov 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
6718
by: Venkat | last post by:
Hi All, I have got two windows namely parent and a child . My parent window has got a link, on clicking which opens a child window(i am using window.open function). I do the following set...
2
11885
by: Len4ik | last post by:
If I open Microsoft Access project without database window, how can I show it from VBA? I don't use startup option "Show database window". In the project disable option "special key". How can I...
3
2285
by: Marcos MOS | last post by:
Hi all, I would like show a message to user when the function's result return "false"... like this .... if (! my_function(params)) showMessage("my string message"); so, How Can I do it?...
7
2516
by: Steve Kallal | last post by:
I have seen this subject tossed around in this forum before. But in my case I need a simple solution. I do NOT need to show progress in terms on percentage complete. But rather I need to show a...
8
6429
by: MV | last post by:
Why can't I run .Show() on a System.Windows.Forms object from a Class? The code works fine if i run it from an other form. The form gets visible but no controls are loaded and the mouse pointer...
2
14099
by: Dean Slindee | last post by:
Anybody written code in VB.NET to: 1) show a print preview window of reports already written and stored in an Access 2002 database; or 2) execute the print of a report stored in an Access 2002...
0
10639
by: Lucian Wischik | last post by:
I'm using ToolTip.Show(x,y,..) to show my balloon-style tooltip at a specified coordinate. Most of the time it works fine and the "tip" of the balloon points exactly to my specified (x,y)...
4
1913
by: DBC User | last post by:
Hi, I have windows form program. While that form is building to show, I want to show another window (kinda splash screen so I can show the user the program is loading..) Can someone suggest a...
3
1548
tpgames
by: tpgames | last post by:
2x2 Sudoku doesn't work at all. The images don't show up on the grid. I don't understand JavaScript very well. Just learning it. Thanks! <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01...
1
3781
oranoos3000
by: oranoos3000 | last post by:
hi would you please help me i have a online shopping center that i show pictures of the my product in home page. in the InterExplorer pictures is shown correctly but in Firefox browser is shown...
0
6967
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7180
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6846
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5439
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4870
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3076
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3071
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1381
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
266
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.