for (int i = 0; i < 10; i++)
{
GetQRCode.GetQr("wfew", Server.MapPath("c:\"+i));//生成二維碼
DownImg("c:\"+i, i.ToString());
}
}
catch
{
return;
}
protected void DownImg(string strHzORCodeUrl,string strImgName)
{
string FilePath = Server.MapPath(strHzORCodeUrl);//轉換物理路徑
try
{
if (File.Exists(FilePath))
{
string filename = "attachment; filename=" + strImgName+".jpg";
Response.AddHeader("Content-Disposition", filename);
Response.Buffer = true;
Response.TransmitFile(FilePath);
Response.Flush();
}
}
catch(Exception e)
{
}
}
第1個 二維碼存到 客戶本地了。 其他9個都沒存下來。 請求大神 引導下,有沒有別的辦法 把二維碼 批量下載到客戶電腦里
uj5u.com熱心網友回復:
一個response只能回應一個檔案,你居然回應9個檔案,想想也不可能啊。轉載請註明出處,本文鏈接:https://www.uj5u.com/net/239485.html
標籤:ASP.NET
上一篇:為啥C#一直連不上資料庫,密碼這些都是對的還是連不上
下一篇:asp未將物件參考到實體
