I have a database table where the user marks files to be downloaded. Subsequently, I browse this table and need to create a fileList to pass to an ActiveX downloader. My rout
To download a file,
Dim b() As Byte = System.IO.File.ReadAllBytes(strServerbasePath & strFileName)
Response.Clear()
Response.ClearHeader()
Response.AddHeader("Content-Type: application/octate-stream")
Repponse.AddHeader("Content-Length: " & b.Length)
Response.AddHeader("Content-Disposition: attachment; filename=" & strFileName)
Response.BinaryWrite(b)
Response.Flush()
Response.End()
Ok, we have an answer.... I actually had double file extensions on the files that were not working but the option to hide known extensions was turned on (I guess by default). The .avi files looked the same as the others so I guess it was considering .avi to be an "unknown" file type. Whatever!
The answer is on my other post here:
Why is FileInfo showing an extra file extension?
Thanks, James