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)
{
}

크리에이티브 커먼즈 라이센스
Creative Commons License
이올린에 북마크하기
2007/05/30 16:46 2007/05/30 16:46
Posted by 바라기
TAG 이올린 태그검색티스토리 태그검색, 이올린 태그검색티스토리 태그검색

트랙백 주소 :: http://www.baragi.pe.kr/baragi/trackback/57

댓글을 달아 주세요

[로그인][오픈아이디란?]