HELP! how to download a file to client 
Author Message
 HELP! how to download a file to client

This seems like a simple enough question, but I can't seem to get this
working right for all browsers.

My ASP script has generated data that I want to send and have saved as
a file on the client side. The two methods I tried were: 1) write the
data to a file on the server, and then just do a redirect to that file
name (eg: Response.Redirect fname); 2) Set the content-type to
"application/foo", then just write out the data (Response.Write data).

What happens in either case depends on what browser the client has.
IE5 will ask to save the data to a file, as will Netscape 4.7 and up.
But, I found that with older browsers, such as IE4, they will just
write the data to the browser window.

And when I do get the client to save the data to a file, the filename
that it suggests is the filename of the ASP page. I tried adding a
header (for the second case) for content-disposition, specifying it as
an attachment with a filename. For IE5 that worked, kinda. The file
was saved, but the browser never seemed to see the end of the
response, since it kept waiting for something more to come from the
server.

Any help at all will be greatly appreciated, since I am desparate to
get this solved and working.

TIA

PS: if possible, please also email any replies to the address below,
since I don't always have access to news.



Sun, 09 Mar 2003 03:00:00 GMT  
 HELP! how to download a file to client


Quote:
> And when I do get the client to save the data to a file, the filename
> that it suggests is the filename of the ASP page. I tried adding a
> header (for the second case) for content-disposition, specifying it as
> an attachment with a filename. For IE5 that worked, kinda. The file
> was saved, but the browser never seemed to see the end of the
> response, since it kept waiting for something more to come from the
> server.

    Try to use URL replacer (http://pstruh.cz) and URL like
http://server/script.asp/parameters/filename.ext to specify filename
(instead of Content-Disposition header)

    Antonin



Mon, 10 Mar 2003 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. need help on client-side file download

2. Download files from client machine to network directory

3. Download jpeg file to the client using asp - Response.addheader ignored by Netscape

4. Does anyone know how to download a file to a client computer

5. Download file in the specific location on the client computer

6. Download a text file from server to client ?

7. Downloading a file to the client machine

8. Client Downloading multiple files from Web Server

9. HELP for UPLOADING and DOWNLOADING files

10. Where can I download Postscript help file?

11. Downloading WSH Help file

12. How To Download to Client Computer From Server ActiveX Control

 

 
Powered by phpBB® Forum Software