PDA

View Full Version : [VBScript] Forçar Download de ficheiro sem abrir no browser


Parafuso
21-03-2006, 12:32
<%

Response.AddHeader "Content-Disposition", "attachment; filename= strFileName
Response.AddHeader "Content-Length", strFileSize
' In a Perfect World, Your Client would also have UTF-8 as the default
' In Their Browser
Response.Charset = "UTF-8"
Response.ContentType = ContentType

Response.BinaryWrite objStream.Read
Response.Flush

objStream.Close
Set objStream = Nothing

%>

God_Lx
21-03-2006, 13:11
Gostei particularmente da parte do UTF-8...