using System.IO;
//写入并导出到磁盘
StreamWriter sw = new StreamWriter(@"H:\text.txt");
sw.WriteLine("ABC");
sw.WriteLine("测试");
sw.WriteLine(123);
sw.Close(); //读取txt
StreamReader sr = new StreamReader(@"H:\text.txt");
Response.Write(sr.ReadLine() + "</br>");
Response.Write(sr.ReadLine() + "</br>");
Response.Write(sr.ReadLine() + "</br>");