T
theintrepidfox
Dear Group
When I call the code below within the click event of a MS Toolbar
control, the code is executed and works fine but the Toolbar freezes.
When calling the same code from a webform button, everything works
fine. Is there any explanation for this behaviour?
Thanks very much for your help & efforts!
Martin
'Set Headers
Response.Clear()
Response.ClearContent()
Response.ClearHeaders()
Response.ContentType = "application/x-msdownload"
Response.AppendHeader("Content-Disposition",
"attachment;filename=Test.doc")
'Create Stream
Dim FileStream As System.IO.FileStream = New
System.IO.FileStream("C:\Inetpub\wwwroot\WebApplication3\progclient\1\assets\files\documents\key\2212005210406_1_1.doc",
System.IO.FileMode.Open)
Dim FileSize As Long = FileStream.Length
Dim bBuffer(FileSize) As Byte
FileStream.Read(bBuffer, 0, Convert.ToInt32(FileSize))
FileStream.Close()
'Output To Client
Response.BinaryWrite(bBuffer)
Response.End()
When I call the code below within the click event of a MS Toolbar
control, the code is executed and works fine but the Toolbar freezes.
When calling the same code from a webform button, everything works
fine. Is there any explanation for this behaviour?
Thanks very much for your help & efforts!
Martin
'Set Headers
Response.Clear()
Response.ClearContent()
Response.ClearHeaders()
Response.ContentType = "application/x-msdownload"
Response.AppendHeader("Content-Disposition",
"attachment;filename=Test.doc")
'Create Stream
Dim FileStream As System.IO.FileStream = New
System.IO.FileStream("C:\Inetpub\wwwroot\WebApplication3\progclient\1\assets\files\documents\key\2212005210406_1_1.doc",
System.IO.FileMode.Open)
Dim FileSize As Long = FileStream.Length
Dim bBuffer(FileSize) As Byte
FileStream.Read(bBuffer, 0, Convert.ToInt32(FileSize))
FileStream.Close()
'Output To Client
Response.BinaryWrite(bBuffer)
Response.End()