Here's the code for the download. It's the progress bar window that IE opens that I'd like to change the title of...
Dim fStream As FileStream
Dim bytesToGo As Long
Dim bytesRead As Long
Dim byteBuffer(2048) As Byte
fStream = New FileStream(rootPath & "\" & e.CommandArgument(), FileMode.Open, FileAccess.Read, FileShare.Read)
bytesToGo = fStream.Length
Response.BufferOutput = False
Response.Clear()
Response.ClearContent()
Response.ClearHeaders()
Response.ContentType = "application/octet-stream"
Response.AppendHeader("Content-Disposition", "attachment; filename=""" & dr("FileName") & """")
Response.AppendHeader("Content-Length", fStream.Length)
Response.Flush()
While (bytesToGo > 0)
If (Response.IsClientConnected) Then
bytesRead = fStream.Read(byteBuffer, 0, 2048)
Response.OutputStream.Write(byteBuffer, 0, bytesRead)
Response.Flush()
bytesToGo -= bytesRead
Else
bytesToGo = -1
End If
End While
fStream.Close()