강제로 다운로드 창 뜨게 하려면 사용하세요.
Response.Expires = 0
Response.Buffer = True
Response.Clear
On Error Resume Next
filename = Request("filename")
filepath = Server.MapPath(".") & "\Upload\" & filename
Response.ContentType = "application/unknown"
Response.CacheControl = "public"
Response.AddHeader "Content-Disposition", "attachment;filename=" & filename
'스트림 이용
Set objStream = Server.CreateObject("ADODB.Stream")
objStream.Open
objStream.Type = 1
objStream.LoadFromFile filepath
strFile = objStream.Read
Response.BinaryWrite strFile
Response.Flush
Set objStream = Nothing
'SiteGalaxy이용
set fso = server.CreateObject("SiteGalaxyUpload.FileSystemObject")
set file = fso.OpenBinaryFile (filepath,1,false)
Response.BinaryWrite file.ReadAll
set fso=nothing
'DextDownLoad 이용
Set objDownload = Server.CreateObject("DEXT.FileDownload")
objDownload.Download filepath
Set objDownload = Nothing
If Err Then
Response.Write Err.number & "<br>" & Err.source & "<br>" & Err.description & "<br>"
Err.Clear
End If
출처 [펌] ASP 첨부파일 다운로드 창 자동 열기..|작성자 혀니