Retrieve From TextFiles

Posted by Siri under C# on 3/29/2012 | Points: 10 | Views : 726 | Status : [Member] | Replies : 2
How to Retrieve the data in Label From Text File




Responses

Posted by: Vforvijay on: 3/29/2012 [Member] Starter | Points: 25

Up
0
Down
Refer the below link..
http://www.dotnetcode.in/2011/01/read-your-file-from-your-harddisk-and.html

Siri, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Subhacomm on: 3/30/2012 [Member] Starter | Points: 25

Up
0
Down
you can use this code
void readTextFile()

{
int Count = 0;
string line;
TextReader Tr = new StreamReader(Request.ApplicationPath + "data.txt");
while ((line = Tr.ReadLine()) != null)
{
lblText.Text = lblText.Text + line + "<br/>";
Count++;
}
Tr.Close();
}


Siri, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response