ZkbFighting
protected void Button1_Click(object sender, EventArgs e)
{
    string url = Server.MapPath("/img/image.png");
    FileInfo file = new FileInfo(url);
    Response.ContentType = "image/png";
    Response.AddHeader("Content-Disposition", "attachment; filename=" + HttpUtility.UrlEncode("优惠券.png", System.Text.Encoding.UTF8));
    Response.WriteFile(url);
    Response.Flush();
}

 

分类:

技术点:

相关文章:

  • 2022-01-27
  • 2021-04-19
  • 2021-10-09
  • 2022-03-03
  • 2021-12-26
  • 2021-11-13
  • 2021-12-02
  • 2021-09-18
猜你喜欢
  • 2021-11-19
  • 2021-12-15
  • 2021-12-15
  • 2022-02-10
  • 2021-11-07
  • 2021-11-09
  • 2021-11-21
相关资源
相似解决方案