473,320 Members | 1,965 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Content Disposition Problem with IE

Hi,

I face this peculiar problem. I have an export to excel functionality
in my ASP.NET application. I set the Response.ContentType and Content
Disposition properties of the page as

Page.Response.ContentType="application/vnd.ms-excel";
Page.Response.AddHeader("Content-Disposition",
"filename=Results.xls");

This page has data displayed on a grid.

Now when I open this page, it prompts for Open / Save… which is what I
want exactly. When I click on Open it opens the excel in IE… This is
Fine. But when I choose Save option, it opens the Save Dialog box
where I select the destination folder, click on save to save the file.
But the page that opened initially whose COntentType and AddHeader
have been set to open in Excel does not close automatically, rather it
displays the "Action Cancelled" error. My requirement is, once I
choose to save, it should close the page and not show "Action
Cancelled".

Any pointers on this would be of great help.

Thanks Much,
Ramjee
Nov 18 '05 #1
0 1162

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Dave Kuhlman | last post by:
Suppose that I have content that looks like what I've included at the end of this message. Is there something in the standard Python library that will help me parse it, break into the parts...
2
by: Martin Körner | last post by:
Hi NG, I am using email module for creating mails with attachment (and then sending via smtplib). If the name of the attachment file is longer than about 60 characters the filename is wrapped...
1
by: Alex Nitulescu | last post by:
Hi. First of all, I *HAVE* to express my annoyance with how badly (at least) this content thing is documented in MSDN. There's no head, nor tail to it. Anyway, I have this code in a form named...
4
by: Jed | last post by:
I have looked everywhere and cannot find a resolution for this. I have read several post on this forum that allude to similar issues but I have not found a solution. I am sending dynamic...
1
by: athirumurthi | last post by:
I have a WinINet communicating with an integration server (X-AspNet-Version: 1.1.4322) using form posts. One form post that includes jpeg content. However, the data received at the server is...
2
by: Tom | last post by:
I have tried three ways of opening word documents on my win95 machines. (Yes, my client still has some win95 machine) #1-With Response.AddHeader "Content-Disposition", "attachment;...
11
by: Trapulo | last post by:
I've this statement in my output's creation: Response.Clear() Response.ContentType = "application/vnd.google-earth.kml+xml kml" Response.AddHeader("Content-Disposition", "inline;...
12
by: Dave H. | last post by:
Please redirect me if this message is posted to the wrong group. Given the intention of delivering content to an HTTP user agent (such as Internet Explorer) which is to be immediately opened by...
6
by: Martin | last post by:
I have a link in a page that allows the user to download a dynamically created XLS file. I add these headers and everything works correctly - as long as the .xls file is in the "home" folder....
8
by: xhunter | last post by:
Hi, I am trying to add support for ranges to my download scripts, so users downloading from my site with eg download managers they have the option for multiple connections/resume. I have gone...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.