pdf文件我有它返回一個PDF文件與此代碼一個aspx頁面:ASP.NET - 保存在服務器上
HttpContext.Current.Response.Clear()
HttpContext.Current.Response.ContentType = "application/pdf"
HttpContext.Current.Response.AddHeader("Content-disposition", "attachment; filename=Order-" & Request("OrderNo") & ".pdf")
HttpContext.Current.Response.BinaryWrite(pdfContent)
HttpContext.Current.Response.End()
需要這樣的文件保存到硬盤做的代碼什麼修改在服務器上驅動?我想BinaryWrite必須用其他東西替換,但是什麼?
我非常感謝您的幫助!
非常感謝,它效果很好!我只需要將文件名添加到上面的代碼中。 – user1898347