ASP.Net  Response.OutputStream to a new window

Posted on 2014-01-29
Last Modified: 2014-01-31
I'm outputting a report to the current window like this.. works fine.
But the back button etc are disabled
How can Output to a new window or popup?

            Response.ContentType = "message/rfc822";
            Response.Expires = -1;
            Response.Buffer = false;
            Response.OutputStream.Write(result.DocumentBytes, 0, result.DocumentBytes.Length);
Question by:JElster
  • 2
  • 2
LVL 21

Expert Comment

by:Craig Wagner
ID: 39819543
The server can't open a new browser window. You'll need to open a new window using JavaScript and set the URL of the new window to be the endpoint that executes the code that returns the report.

Author Comment

ID: 39819734
Ok.. If I open a window in JS. How can write the response (to the window)

Author Comment

ID: 39824469
I've requested that this question be closed as follows:

Accepted answer: 0 points for JElster's comment #a39819734

for the following reason:

no answer
LVL 21

Accepted Solution

Craig Wagner earned 500 total points
ID: 39824423
How can write the response (to the window)

By doing what I told you to do in the original message I wrote, i.e.

set the URL of the new window to be the endpoint that executes the code that returns the report.

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
File Upload Control on a ASP.NET Overlay Page 1 42
c# LinkButton OnClientClick 2 34
Tool Box 2 35
When should I use a controller? 3 22
One of the pain points with developing AJAX, JavaScript, JQuery, and other client-side behaviors is that JavaScript doesn’t allow for cross domain request for pulling content. For example, JavaScript code on could not pull conte…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now