When we develop a function to let client download the files not directly open in the internet explorer,
there are two ways. One is coding an intergrade file under reading and writing binary file, such as:
Response.expires = 0
Response.expiresabsolute = Now() - 1
Response.addHeader "pragma","no-cache"
Response.addHeader "cache-control","private"
Response.Buffer = True
Response.Clear
Response.ContentType = "application/octet-stream"
Response.AddHeader "Content-Disposition", "attachment;filename=*****"
Response.expiresabsolute = Now() - 1
Response.addHeader "pragma","no-cache"
Response.addHeader "cache-control","private"
Response.Buffer = True
Response.Clear
Response.ContentType = "application/octet-stream"
Response.AddHeader "Content-Disposition", "attachment;filename=*****"
Response.BinaryWrite bytFileBytes
The other one we should do the setting of server. We need to delete "content-type:text/html; charset=*****" in Custom HTTP Headers of IIS. But this is not intergrant, I think.
浙公网安备 33010602011771号