19. Januar 2012 10:55
FileInfo downloadFile = new FileInfo(docFilename.ToString());
HttpContext.Current.Response.Clear();
HttpContext.Current.Response.AddHeader("Content-Disposition", string.Format("attachment; filename={0}", downloadFile.Name));
HttpContext.Current.Response.AddHeader("Content-Length", downloadFile.Length.ToString());
HttpContext.Current.Response.ContentType = "application/vnd.ms-word";
HttpContext.Current.Response.WriteFile(downloadFile.FullName);
HttpContext.Current.Response.End();
20. Januar 2012 14:48