c#网页中输出txt文件。
2009-12-28 17:11 Lecone.JY.HU 阅读(637) 评论(0) 编辑 收藏 举报System.Text.StringBuilder sb = new System.Text.StringBuilder();
sb.Append("企业编号(企业标识)|AP编号|开始时间|结束时间|备注|金额(分)\r\n");
string outname="outdown.txt";
Response.ContentType = "application/octet-stream";
Response.AppendHeader("content-disposition", string.Format("attachment;filename={0}", outname));
Response.Write(sb.ToString());
Response.Flush();
Response.End();