AttachFile attachFile = new AttachFile(contentId, DMSHelper.Database);
//将文件保存到本机上
Response.Clear();
Response.AddHeader("Content-Disposition", "attachment; filename=" + Server.UrlEncode(attachFile.Title + "." + attachFile.DataType));
Response.AddHeader("Content-Length", attachFile.Data.Length.ToString());
Response.ContentType = "application/octet-stream";
Response.Filter.Close();
Response.BinaryWrite(attachFile.Data);
Response.Flush();