vb *** 作文件下载

vb  *** 作文件下载,第1张

概述Private Sub DownLoad(ByVal filePath As String) Dim Fi As New FileInfo(filePath)'filePath文件路径 If Fi.Exists Then Dim fs As New FileStream(filePath, FileMode.Open)
    Private Sub DownLoad(ByVal filePath As String)        Dim Fi As New fileInfo(filePath)'filePath文件路径        If Fi.Exists Then            Dim fs As New fileStream(filePath,fileMode.Open)            Dim bytes As Byte() = New Byte(CInt(fs.Length) - 1) {}            fs.Read(bytes,bytes.Length)            fs.Close()            Response.ContentType = "application/octet-stream"            response.addheader("Content-disposition","attachment; filename=" & System.Web.httpUtility.UrlEncode("temp.xls",System.Text.EnCoding.GetEnCoding("utf-8")))'temp.xls 为文件的名称            Response.BinaryWrite(bytes)            Response.Flush()            Response.End()        End If    End Sub
总结

以上是内存溢出为你收集整理的vb *** 作文件下载全部内容,希望文章能够帮你解决vb *** 作文件下载所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/langs/1292199.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-06-10
下一篇 2022-06-10

发表评论

登录后才能评论

评论列表(0条)

保存