标签:
string path = @"F:\me\Smile\1\Web\image\1.jpg"; string name = "1.jpg"; FileInfo Downloadfile = new FileInfo(path); Response.Clear(); Response.ClearHeaders(); Response.Buffer = false; Response.ContentType = "application/octet-strearm"; Response.AppendHeader("Content-Disposition", "attachment;filename=" + HttpUtility.UrlEncode(name, System.Text.Encoding.UTF8)); Response.AppendHeader("Content-Length", Downloadfile.Length.ToString()); Response.WriteFile(Downloadfile.FullName); Response.Flush(); Response.End();
using System.IO;
标签:
原文地址:http://www.cnblogs.com/jingyong001/p/5582881.html