Solved

ASP.Net  Response.OutputStream to a new window

Posted on 2014-01-29
4
621 Views
Last Modified: 2014-01-31
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
Comment
Question by:JElster
  • 2
  • 2
4 Comments
 
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.
0
 
LVL 1

Author Comment

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

Author Comment

by:JElster
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
0
 
LVL 21

Accepted Solution

by:
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.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

743 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

14 Experts available now in Live!

Get 1:1 Help Now