string FileSrc = Server.MapPath("TextFile1.txt");
if (File.Exists(FileSrc))
{
StreamReader sr = File.OpenText(FileSrc);
string srrow = null;
while ((srrow = sr.ReadLine()) != null){
Response.Write(srrow);
}
sr.Close();
}
转载于:https://www.cnblogs.com/handsomer/p/3696282.html