Wednesday, May 16, 2012

How to read the content of text file in asp.net


using System.IO;

StreamReader Strmrdrobj =
new StreamReader(Server.MapPath("Test.txt"));
/*System.IO namespace for StreamReader */
txtTest.Text = Strmrdrobj.ReadToEnd();Strmrdrobj.Close();

No comments:

Post a Comment

Comments

Search

Custom Search
Protected by Copyscape Plagiarism Software