G
Guest
Hi,
I have created a website, where users can download some documents. After
clicks on a specific download-link following code is used:
Dim file As System.IO.FileInfo = New System.IO.FileInfo(filename)
If file.Exists Then
Response.Clear()
Response.AddHeader("Content-Disposition", "attachment;
filename=" & file.Name)
Response.AddHeader("Content-Length", file.Length.ToString())
Response.ContentType = "application/msword"
Response.WriteFile(file.FullName)
Response.End()
Else
Response.Write("Document doesn't exist.")
End If
So, that works fine on most machines. But on some the browser is shut down
after downloading the document. I've read somthing about that this was a
known problem in IE 5.5, but all users of mine are using IE 6.
So, does somebody know, what I'm doing wrong!?
Thanks,
Fabian F.
I have created a website, where users can download some documents. After
clicks on a specific download-link following code is used:
Dim file As System.IO.FileInfo = New System.IO.FileInfo(filename)
If file.Exists Then
Response.Clear()
Response.AddHeader("Content-Disposition", "attachment;
filename=" & file.Name)
Response.AddHeader("Content-Length", file.Length.ToString())
Response.ContentType = "application/msword"
Response.WriteFile(file.FullName)
Response.End()
Else
Response.Write("Document doesn't exist.")
End If
So, that works fine on most machines. But on some the browser is shut down
after downloading the document. I've read somthing about that this was a
known problem in IE 5.5, but all users of mine are using IE 6.
So, does somebody know, what I'm doing wrong!?
Thanks,
Fabian F.