62,244
社区成员




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)
{
}
}