DataTable Data=Components.DocumentSystem.FileDataByID(int.Parse(NV.GetValues("ID")[0]));//读取数据到DataTable中。

DataRow Row=Data.Rows[0];
Response.Clear();
Response.ContentType = "application/octet-stream";
Response.AddHeader("Content-Disposition", "attachment;FileName="+HttpUtility.UrlEncode(Row["Title"].ToString(),System.Text.Encoding.UTF8)+"."+Row["ContentType"].ToString());
Response.BinaryWrite((byte[])Row["FileData"]);//写出流!
Response.End();

相关文章:

  • 2022-01-16
  • 2021-04-26
  • 2022-12-23
  • 2022-01-07
  • 2021-08-07
  • 2021-12-22
  • 2021-05-13
  • 2021-06-19
猜你喜欢
  • 2021-07-24
  • 2021-07-26
  • 2022-12-23
  • 2022-12-23
  • 2021-05-10
  • 2021-06-09
  • 2021-12-10
相关资源
相似解决方案