解决Chrome 下载带半角分号出现net::ERR_RESPONSE_HEADERS_MULTIPLE_CONTENT_DISPOSITION的问题
方式一:添加双引号
Response.AddHeader("content-disposition", "attachment; filename=\"" + FileName + "\"")
方式二:替换掉文件的半角分号
var FileName = "www.kzwr.com,酷站网软".Replace(",", "")
Response.ContentType = "application/pdf"
Response.AddHeader("content-disposition", "attachment; filename=" & FileName)
Response.BinaryWrite(myPDF)
沒有留言:
張貼留言