
2008年8月7日
string strFile = Server.MapPath("../UpLoad/IssueTrackingFiles/")+lbFileList.Items[item].Text;
System.IO.FileInfo file = new System.IO.FileInfo(strFile);
Response.Clear();
Response.AddHeader("Content-Disposition", "attachment; filename=" + HttpUtility.UrlEncode(file.Name));
Response.AddHeader("Content-Length", file.Length.ToString());
Response.ContentType = "application/octet-stream";
Response.WriteFile(file.FullName);
Response.End();
posted @ 2008-08-07 13:17 蓝色海岸线 阅读(18) 评论(0)
编辑