摘要:
protected void dFile(string name) { string path = Server.MapPath("~") + name; //初始化 FileInfo 类的实例,它作为文件路径的包装 FileInfo fi = new FileInfo(path); Response.Clear(); Response.AddHeader("Content-Disposition", "attachment; filename=" + Server.UrlEncode(fi.Name)); //Response.Ad 阅读全文