Forcing download dialog box problem
Having some problems in creating a force download asp. I have got the code from a common example on the net, but I just can't get it working right. The download box does pop up with the correct filename (but always shows a .rar icon). But when I download it the file is always 4kb in size and cannot be opened.
Here is my code:
Response.ContentType = "application/unknown"
Response.AddHeader "Content-Disposition","attachment; filename=" & Request("FileName")
Set objStream = Server.CreateObject("ADODB.Stream")
objStream.Type = 1
objStream.LoadFromFile Server.MapPath("vaggio/") & Request("FileName")
download = objStream.Read
Set objstream = Nothing
and it is called by:
any help on this would be much appreciated