string file = Server.MapPath ("abc.html");
StreamReader sr;
FileInfo fi = new FileInfo(file);
if(File.Exists(file))
{
sr = File.OpenText(file);
input += sr.ReadToEnd();
sr.Close();
}
Another Method
string[] lines = File.ReadAllLines("path/to/my/file.html");
foreach(string line in lines)
{
Response.Write(line);
}

0 comments:
Post a Comment