B
ben.s.carlson
Hi,
I'm sending a file to the browser using asp.net, and I want it to open
up in excel. The dialog box pops up, but when I press the open button,
the file opens up with a [1] appended to it. That is, if my file is
called File.csv, the browser opens it up as File[1].csv. I would chalk
this up as browser behavior, but there are actually examples out there
where the [1] is not appended, notably
http://www.sharkcode.com/ssc/Resume/DownloadResume.aspx. Does anybody
know how this is accomplished?
Here is the code that I'm currently using (VB.Net):
Response.Clear()
Response.AddHeader("Content-Disposition", "attachment; filename=""" &
sFileName & """")
Response.Flush()
Response.Write("C:\Windows\Temp\Test Download.csv")
Response.End()
Thanks for any help,
Ben
I'm sending a file to the browser using asp.net, and I want it to open
up in excel. The dialog box pops up, but when I press the open button,
the file opens up with a [1] appended to it. That is, if my file is
called File.csv, the browser opens it up as File[1].csv. I would chalk
this up as browser behavior, but there are actually examples out there
where the [1] is not appended, notably
http://www.sharkcode.com/ssc/Resume/DownloadResume.aspx. Does anybody
know how this is accomplished?
Here is the code that I'm currently using (VB.Net):
Response.Clear()
Response.AddHeader("Content-Disposition", "attachment; filename=""" &
sFileName & """")
Response.Flush()
Response.Write("C:\Windows\Temp\Test Download.csv")
Response.End()
Thanks for any help,
Ben