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();

 

相关文章:

  • 2021-07-22
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-23
  • 2021-07-08
  • 2022-12-23
  • 2021-12-07
猜你喜欢
  • 2022-01-28
  • 2021-07-16
  • 2022-12-23
  • 2021-08-16
  • 2021-07-18
  • 2021-06-11
相关资源
相似解决方案