Response.Clear(); Response.Charset = "GB2312"; Response.ContentEncoding = System.Text.Encoding.GetEncoding("GB2312"); Response.AppendHeader("Content-Disposition", "attachment;filename=" + HttpUtility.UrlEncode(FileName, System.Text.Encoding.UTF8).ToString()); Response.ContentType = FileType; this.EnableViewState = false; System.IO.StringWriter sw = new System.IO.StringWriter(); HtmlTextWriter hw = new HtmlTextWriter(sw); repeater2.RenderControl(hw); string str = hw.InnerWriter.ToString(); Response.Write("<html><head><meta http-equiv=Content-Type content="text/html; charset=gb2312">"); Response.Write(sw.ToString()); Response.Write("</body></html>"); Response.End();