473,325 Members | 2,712 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,325 software developers and data experts.

File Download Problems

I am trying to download a file created on the fly from a string using Response.Write(), but cannot get around the problem of having to use Response.End() to prevent the HTML for the page being added to the end of the file

Once the Download dialog has been invoked, I want to immediately Redirect to another page within the same browser window. Obviously, calling Response.End() precludes this

There must be a simple way of doing this. Any suggestions garatefully received

Thanks

Martin
Nov 18 '05 #1
1 918
Hi, Martin Lee,

You can't send redirect instruction after you have sent any content to the
client. In other words the response should be

- 200 OK followed by the actual content
or
- 302 Found and redirect to the other address

Can't be both.

Hope this helps
Martin
"Martin Lee" <an*******@discussions.microsoft.com> wrote in message
news:4F**********************************@microsof t.com...
I am trying to download a file created on the fly from a string using Response.Write(), but cannot get around the problem of having to use
Response.End() to prevent the HTML for the page being added to the end of
the file.
Once the Download dialog has been invoked, I want to immediately Redirect to another page within the same browser window. Obviously, calling
Response.End() precludes this.
There must be a simple way of doing this. Any suggestions garatefully received.
Thanks,

Martin

Nov 18 '05 #2

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

Similar topics

6
by: clintonG | last post by:
After the last six days trying to download VS2005 Professional it seems there may be a problem with my instance of the File Transfer Manager (FTM) or somewhere in the network in between. I can't...
0
by: Simon McCulloch | last post by:
Hi all I have an ASP.net website that uses an aspx page locate and stream a file to an authenticated user and I'm getting the error Aspnet_wp.exe (PID:XXXX) stopped unexpectedly which the user...
5
by: Brad | last post by:
In several aspx applications I export crytal reports to pdf, xls and doc files and then the aspx page writes the selected export file to the client browser. This all works with one small quirk: ...
2
by: Joey | last post by:
I have a web app that uses forms authentication. The app also has a downloads section, and I need to be able to use <location> tags to control access to the downloadable files there (preferably by...
18
by: Jen | last post by:
I'm using Microsoft's own VB.NET FTP Example: http://support.microsoft.com/default.aspx?scid=kb;en-us;832679 I can get the program to create directories, change directories, etc., but I can't...
1
by: theburnetts | last post by:
I am building an ASP.NET application that has a requirement that the user should be able to download all of the data that they have input into the system and save it to a file on their local PC. ...
4
by: Jonny | last post by:
Hello Group How do I open a Save File Dialog from an ASPX page behind a browse button? Any help would be fantastic!! I am using ASP.NET 1.1 using VB.NET as the coding language TIA
1
by: Tlholo | last post by:
Here are the requirements for the project. I have also included the other project that I am working on and is also giving me some problems. i need code examples. Project 1 This program actually...
7
by: lawrence k | last post by:
I've got a music studio for a client. Their whole studio is run with Macintosh computers. Macintosh computers allow file names to have open white spaces, such as "animal hospital.mp3". I have a...
1
KevinADC
by: KevinADC | last post by:
Note: You may skip to the end of the article if all you want is the perl code. Introduction Many websites have a form or a link you can use to download a file. You click a form button or click...
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...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
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: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
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...

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.