2009. 5. 26. 17:26
Response.AddHeader("Content-Disposition", "attachment;fileName=" + Server.UrlEncode(fileName));
string encoding = Request.ContentEncoding.HeaderName;
Response.ContentType = "application/unknown";
Response.Write("<meta http-equiv='Content-Type' content='text/html; charset=" + encoding + "'>");
Response.Buffer = true;
rpt_Excel.EnableViewState = false;
System.IO.StringWriter tw = new System.IO.StringWriter();
System.Web.UI.HtmlTextWriter hw = new System.Web.UI.HtmlTextWriter(tw);
rpt_Excel.RenderControl(hw);
//한글화깨짐을 해결하는 방법..
String convStr = tw.ToString();
Response.Write(convStr);
Response.End();
string encoding = Request.ContentEncoding.HeaderName;
Response.ContentType = "application/unknown";
Response.Write("<meta http-equiv='Content-Type' content='text/html; charset=" + encoding + "'>");
Response.Buffer = true;
rpt_Excel.EnableViewState = false;
System.IO.StringWriter tw = new System.IO.StringWriter();
System.Web.UI.HtmlTextWriter hw = new System.Web.UI.HtmlTextWriter(tw);
rpt_Excel.RenderControl(hw);
//한글화깨짐을 해결하는 방법..
String convStr = tw.ToString();
Response.Write(convStr);
Response.End();
'구 MiniHomepy > Experience' 카테고리의 다른 글
[javascript] 체크박스리스트 값 (0) | 2009.05.26 |
---|---|
엑셀 만들기에서 문자형식으로 변환 (0) | 2009.05.26 |
신뢰할 수 있는 사이트 등록 (0) | 2009.05.26 |