response.binarywrite

  • Thread starter Thread starter abcd
  • Start date Start date
A

abcd

I am writing a page which uses response.binarywrite to the client, after it
has completed sending the file I am interested in I want to display some
mesange like "download completed" etc...I am unable to set such javascript
.....

my code

Response.AddHeader "Content-Disposition", "attachment; filename=" &
objFile.Name
Response.AddHeader "Content-Length", objFile.Size
Response.ContentType = "application/octet-stream"
Set objStream = Server.CreateObject("ADODB.Stream") objStream.Open
objStream.Type = 1 Response.CharSet = "UTF-8"
objStream.LoadFromFile(strAbsFile)
Response.BinaryWrite(objStream.Read)
objStream.Close
Set objStream = Nothing
Set objFile = Nothing Response.End

How can I display Windo.alert("download completed") after this code...I put
this code but doesnt work. Windo.alert is ignored. if I change the
window.alert location to some other part of the code then I dont get that
standard doenload dialog box which shows open or save options....moreover
firrefox behaves differently

thanks
 
You'll not be able to do this in the same stream as the binary
is in if you expect the browser to render your binary.

--
Robbe Morris - 2004/2005 Microsoft MVP C#

Earn money answering .NET Framework
messageboard posts at EggHeadCafe.com.
http://www.eggheadcafe.com/forums/merit.asp
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top