G
Guest
I am trying to download a text file that my .NET page has just created based
on entered parameters on the web page. Everything seems to work and the file
is created. I am using the following code to start the download process:
Response.Clear()
Response.ContentType = "text/plain"
Response.AppendHeader("Content-Disposition", "attachment; filename="
& fileName)
Response.AppendHeader("Content-Description", "This is your Cost
Journal import file.")
Response.Flush()
Response.WriteFile(fileName)
Response.End()
The download does start. However, the "FileName" suggested in the dialoge
to the user is the .NET webpage name without an extention, there is no
default file type, and the description does not display. If a file name is
entered by the user in the "save" the proper information is downloaded. Can
anyone suggest one of two things:
1. What might I be doing incorrectly?
2. Is there a better/simpler way to download a file which has just been
created?
Thank you for your help in advance.
Tom Youngquist
(e-mail address removed)
on entered parameters on the web page. Everything seems to work and the file
is created. I am using the following code to start the download process:
Response.Clear()
Response.ContentType = "text/plain"
Response.AppendHeader("Content-Disposition", "attachment; filename="
& fileName)
Response.AppendHeader("Content-Description", "This is your Cost
Journal import file.")
Response.Flush()
Response.WriteFile(fileName)
Response.End()
The download does start. However, the "FileName" suggested in the dialoge
to the user is the .NET webpage name without an extention, there is no
default file type, and the description does not display. If a file name is
entered by the user in the "save" the proper information is downloaded. Can
anyone suggest one of two things:
1. What might I be doing incorrectly?
2. Is there a better/simpler way to download a file which has just been
created?
Thank you for your help in advance.
Tom Youngquist
(e-mail address removed)