ASP.NET 提示使用者下載檔案

Response.Clear()
Response.Buffer = True
Response.HeaderEncoding = System.Text.Encoding.GetEncoding("big5")
Response.AppendHeader("Content-Disposition", "attachment;filename=" + "交通住宿名單.xml")
Response.ContentType = "application/vnd.ms-excel"
Response.Write(filestream)
Response.End()

留言

熱門文章