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

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

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

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…
A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

777 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