1
Response.ClearContent();
2
Response.ClearHeaders();
3
Response.ContentType = contentType;
4
//Response.ContentEncoding = System.Text.Encoding.UTF8;
5
//Response.Charset = "utf-8";
6
Response.AddHeader("Content-Disposition:", "attachment; filename=" + Server.UrlEncode(fileName));
7
8
Response.WriteFile(DiskFileName);
9
Response.Flush();
10
Response.Close();
11
12
System.IO.File.Delete(DiskFileName);
2
3
4
5
6
7
8
9
10
11
12