Asp.net 写文件
string fr = System.DateTime.Now.ToString ("yyyyMMddHHmmss");
string fileName = "Test-"+ fr +".txt";
string path = System.Configuration.ConfigurationSettings.AppSettings["Files"]; // 文件存放目录
string pathfrom = Path.Combine(path,fileName.ToString()); //全路径名
System.IO.StreamWriter writer = new StreamWriter(pathfrom );
writer.WriteLine(info); //将字符串写到指定的文本文件
writer.Close();