Response.Clear();
        Response.AddHeader("content-disposition", "attachment;filename=FileName.txt");
        Response.Charset = "gb2312";
        Response.ContentEncoding = System.Text.Encoding.GetEncoding("GB2312");
        Response.ContentType = "application/vnd.txt";
        StringBuilder sb = new StringBuilder(Regex.Replace(mobiles, ",", "\r\n"));
        System.IO.StringWriter stringWrite = new System.IO.StringWriter(sb);
        System.Web.UI.HtmlTextWriter htmlWrite = new HtmlTextWriter(stringWrite);           
        Response.Write(stringWrite.ToString());
        Response.End();

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-05-28
猜你喜欢
  • 2022-12-23
  • 2021-05-24
  • 2022-02-16
  • 2022-12-23
  • 2021-09-14
  • 2022-12-23
  • 2022-01-01
相关资源
相似解决方案