Trouble with Content-Disposition -- Pls Help!

J

Jonathan Atkinson

Having trouble with the following code:

Response.ContentType = "application/binary"
Response.AddHeader "Content-Disposition","attachment; filename=test.txt"

I have a file on the server, "test.txt", which is in the same directory as
the referring asp page. The file has some text in it. But when I go to the
page and download the file to my hard drive, there is no text... it's a
blank file.

You can try it for yourself:
The file is located at www.ballroomdancers.com/Temp/test.txt
The asp page is www.ballroomdancers.com/Temp/test.asp

If you look at the actual file, you will see that there is text in it. But
when you visit thepage which uses response.addheader to download the file,
it downloads an empty file.

Any ideas what's going on?

Thanks in dvance for your help!

Regards,
Jonathan Atkinson
www.ballroomdancers.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,968
Messages
2,570,149
Members
46,695
Latest member
StanleyDri

Latest Threads

Top