请问怎么回事?
我调用的类是 public static void Export(System.Web.UI.Control ctl, int nDestType)
{
string header;
string contenttype;
switch( nDestType )
{
case 0:
header       = "attachment;filename=memory.xls";
contenttype  = "application/ms-excel";
break;
case 1:
header       = "attachment;filename=memory.doc";
contenttype  = "application/msword";
break;
case 2:
header       = "attachment;filename=memory.html";
contenttype  = "text/HTML";
break;
default:
header       = "attachment;filename=memory.html";
contenttype  = "text/HTML";
break;
}
HttpContext.Current.Response.Charset ="utf-8";
HttpContext.Current.Response.AppendHeader("Content-Disposition",header);
HttpContext.Current.Response.ContentEncoding =System.Text.Encoding.GetEncoding("utf-8"); 
//HttpContext.Current.Response.ContentEncoding =System.Text.Encoding.GetEncoding("GB2312"); 
HttpContext.Current.Response.ContentType = contenttype;
ctl.Page.EnableViewState =false;
System.IO.StringWriter  tw = new System.IO.StringWriter() ;
System.Web.UI.HtmlTextWriter hw = new System.Web.UI.HtmlTextWriter (tw);
ctl.RenderControl(hw);
HttpContext.Current.Response.Write(tw.ToString());
HttpContext.Current.Response.End();
}