Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 197373
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T16:50:50+00:00 2026-05-11T16:50:50+00:00

My application pushes out a PDF file to a popup (e.g. no menu/toolbar) browser

  • 0

My application pushes out a PDF file to a popup (e.g. no menu/toolbar) browser window (in response to the user clicking a button). This works for every browser out there except for IE7. In IE7, all I get is a blank window.

Here is the server-side code that pushes out the PDF:

private void StreamPDFReport(string ReportPath, HttpContext context)
{
    context.Response.Buffer = false;
    context.Response.Clear();
    context.Response.ClearContent();
    context.Response.ClearHeaders();        

    // Set the appropriate ContentType.
    context.Response.ContentType = "application/pdf";
    context.Response.AddHeader("Content-Disposition", "inline; filename=Report.pdf");
    context.Response.Cache.SetCacheability(HttpCacheability.NoCache);        

    // Write the file directly to the HTTP content output stream.
    context.Response.WriteFile(ReportPath);
    HttpContext.Current.ApplicationInstance.CompleteRequest();
    //context.Response.End();
}

On the client side, when the user presses the button, the following happens in the onClick handler:

onclick=”window.open(‘RptHandler.ashx?RptType=CaseInfo’, ‘Report’, ‘top=10,left=10,width=1000,height=750’)

Am I missing something really basic? Why does it work in every browser but not IE?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-11T16:50:50+00:00Added an answer on May 11, 2026 at 4:50 pm

    It turns out that the following statement causes IE to not display the PDF:

    context.Response.Cache.SetCacheability(HttpCacheability.NoCache); 
    

    Not sure why.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In my application my initial view controller pushes a UITabBarController modally which has 4
Application, have a TextBlock and two Buttons, the text is displayed TextBlock by clicking
Application : HTA (therefore IE) This is an application that uses SendKeys to populate
Application is running in my local system app.config file <add key=dbconn value=Data Source=(local);database=VTech;User ID=sa;Password=sa;
We're using a load cell that pushes out the force of an object. Connected
This application is the first application challenge on the site hackthissite.org. The idea is
My application launches into a navigation controller. The root view controller has a button
Right now my application is spitting out: Now Showing: 2012-01-07 – 2012-06-07 Which is
I writing an application that pushes data over an external service to some server.
I'm working on a streaming media application that pushes a lot of data to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.