블로그 이미지
baragi76

카테고리

분류 전체보기 (115)
생활 (10)
My Story (34)
My Album (1)
HomePage (0)
Hobbies (21)
Develop (42)
Utility (1)
Project (6)
09-27 08:49
Total241,010
Today0
Yesterday10

공지사항

달력

« » 2020.9
    1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30      

안정적인 DNS서비스 DNSEver

string destFile = strTempDir + strFileName + ".docx";
FileStream sm1 = File.OpenRead(destFile);

Response.ClearHeaders();
Response.ClearContent();
Response.Clear();

Response.ContentType = "application/vnd.openxmlformats-officedocument.wordprocessingml.document";

Response.AddHeader("Content-disposition", "attachment;filename=" + "OKOK.docx;");
Response.AddHeader("Content-Length", sm1.Length.ToString());

Response.WriteFile(destFile);
Response.Flush();
Response.Close();

sm1.Close();

try
{
 if (File.Exists(destFile))
 {
  File.Delete(destFile);
 }
}
catch (Exception ex)
{
}

Posted by baragi76
TAG ASP.NET, Web

댓글을 달아 주세요

 
Posted by baragi76
TAG Web, XML, 공백

댓글을 달아 주세요