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

  • Home
  • SEARCH
  • 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 109065
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T02:00:39+00:00 2026-05-11T02:00:39+00:00

The following code will not run correctly in IE7 with the latest service packs

  • 0

The following code will not run correctly in IE7 with the latest service packs installed.

System.Web.HttpResponse response = System.Web.HttpContext.Current.Response; response.Clear(); response.AddHeader('Content-Disposition', 'attachment;filename=Contacts.xls'); response.ContentType = 'application/octet-stream';  System.Text.UnicodeEncoding Encoding = new System.Text.UnicodeEncoding();  byte[] unicodeBytes = {255,254}; int length = 2 + Encoding.GetByteCount(_exportContent); // _exportContent is string. response.AddHeader('Content-Length', length.ToString()); response.OutputStream.Write(unicodeBytes, 0, 2); unicodeBytes = Encoding.GetBytes(_exportContent); response.OutputStream.Write(unicodeBytes, 2, unicodeBytes.Length); response.End(); 

I am opening the aspx page with js (window.open()) and execute the above code in the Page_Load().

The strange thing is that the window pops up, tries to load/show the file dialog and then you hear the sound like a popup window has been blocked (although popup blocker is deactivated!).

Extra information:
– The behavior happens both on XP and W2k3 (which is a real web server without anything else installed but IE7 & FW 3.5 SP1 & latest service packs.) – The same code works fine with FW 2.0 – Firefox has no problems to display a file dialog.

I would be curious if anyone else has ran into the same problem and could provide a solution for getting the thing working in IE7.

Cheers,
Dimi

  • 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. 2026-05-11T02:00:39+00:00Added an answer on May 11, 2026 at 2:00 am

    Add a Header telling IE explicitly to CACHE the file. IE has known bugs with not being able to properly save a file if it is sent as a no-cache file.

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

Sidebar

Ask A Question

Stats

  • Questions 59k
  • Answers 59k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer Update for clarification: The problem is not with stale, freed… May 11, 2026 at 8:57 am
  • added an answer You are looking for array_shift(). PHP Array Shift May 11, 2026 at 8:57 am
  • added an answer You might want to start with the Garbage Collector. MSDN… May 11, 2026 at 8:57 am

Related Questions

The following code will not run correctly in IE7 with the latest service packs
I have the following code, which will not work. The javascript gives no errors
The following code will generate a link to the page I want to get
Will the following code result in a deadlock using C# on .NET? class MyClass
Consider the following code: $(a).attr(disabled, disabled); In IE and FF, this will make anchors
I found the following code to create a tinyurl.com url: http://tinyurl.com/api-create.php?url=http://myurl.com This will automatically
When IE8 is released, will the following code work to add a conditional stylesheet?
i have the following jquery code. basically i will have several overlapped divs and
I'm trying to write a piece of code that will do the following: Take
The following code works great in IE, but not in FF or Safari. I

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.