Response.TransmitFile但是文件没有下载没有javascript错误没有任何异常代码顺利执行。
Dim FilePath As String = Functions.DecryptString(HttpUtility.UrlDecode(Request.Form("filepath")).Replace(" ", "+"), Settings.UrlEncryptionKey, Settings.UrlEncryptionVecotor).ToString()
Dim FileName As String = Request.Form("filename")
Dim CompletePath = Settings.WebSiteResourcePhysicalPath & FilePath & FileName
If IO.File.Exists(CompletePath) Then
Response.Clear()
Response.AppendHeader("content-disposition", "attachment; filename=" + FileName)
Response.ContentType = "Application/octet-binary"
Response.TransmitFile(CompletePath)
Response.End()
Response.Flush()
End If
复制并粘贴“CompletePath”,文件也在那里。请帮帮我