Your second choice (file) sounds better. I thought that it had to do more with setting context type but I tried text/plain and a couple of others and couldn't get it to work.
So I'll create a txt file, I guess with a weird extension so the browser does not attempt to show it but to download it instead. When should the temp file be deleted to make sure that they had enough time to download it (it's fairly short) and that it does not linger too long on the server for security purposes?
Thanks Guy
>>>>>>>>>>>>
One way is to output with response.write without any HTML tags. The user can then choose File/Save As to save the file.
You can also output to a temp file on the server and redirect to that file. You'll have to clean up at some point. If the file contains sensitive data, other users could have access to it before you delete the file.
>>>>>>>>>>>>