编程技术08 Oct 2006 02:38 pm

            Dim objFileInfo As System.IO.FileInfo = New System.IO.FileInfo(strWinPath & strFileNm)

            If System.IO.File.Exists(strWinPath & strFileNm) Then
                Response.Clear()
                Response.ContentType = "application/octet-stream"
                Response.AddHeader("Content-Disposition", "attachment;  filename=" + objFileInfo.Name)
                Response.AddHeader("Content-Length", objFileInfo.Length.ToString())
                Response.WriteFile(objFileInfo.FullName)
                Response.Flush()
                Response.End()
            End If

Trackback this Post | Feed on comments to this Post

Leave a Reply