public partial class how_to_readfile : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
string[] copy = File.ReadAllLines("F:\\pravat.txt"); // create text file in ur computer(write something)
for (int i = 0; i < copy.Length; i++)
{
Response.Write(copy[i]+"<br/>");
}
}
}
No comments:
Post a Comment