• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 784
  • Last Modified:

ASP.Net Response.OutputStream to a new window

Hi..
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?
thx

   Response.Clear();
            Response.ContentType = "message/rfc822";
            Response.Cache.SetCacheability(HttpCacheability.Private);
            Response.Expires = -1;
            Response.Buffer = false;
            Response.OutputStream.Write(result.DocumentBytes, 0, result.DocumentBytes.Length);
            Response.End();
0
JElster
Asked:
JElster
  • 2
  • 2
1 Solution
 
Craig WagnerSoftware ArchitectCommented:
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.
0
 
JElsterAuthor Commented:
Ok.. If I open a window in JS. How can write the response (to the window)
0
 
JElsterAuthor Commented:
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
0
 
Craig WagnerSoftware ArchitectCommented:
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.
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now