Downloading generated files

P

Paulo

Hi, the system generates a text file on a server folder called "remessa",
how do I do to user downloads the generated file to his machine?

VS 2005 asp.net C# 2.0

Thanks
 
D

David W

If you want to stream the file down, do the following code. Otherwise, just
give them a link to the generated file.


Response.ClearContent()
Response.AddHeader("content-disposition", "attachment;
filename=remessa.txt")
Response.ContentType = "text/html"

Response.Write("Your file text here")

Response.End()
 

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

No members online now.

Forum statistics

Threads
473,777
Messages
2,569,604
Members
45,234
Latest member
SkyeWeems

Latest Threads

Top