How to read the data line by line from a File?

In my application,in Dialog1 writing the data line by line,upto this working perfectly,where as in Dialog2 while reading the data line by line always reading the first line.
How to read the data line by line?Though simple one,Iam in confusion.Pls help me.

In Dialog1, for File.txt ,writing the names as

Name1
Name2
Name3

and on the other side I want to read the names one by one,but In Dialog2 always reading the Name1,not going to the second line.

Hai,
pls see the File.txt.In Dialog1 Iam encrypting the data and writing the encrypted data to File.In Dialog2, I want to read the encrypted data from File one by one.Is this correct way of writing encrypted data to a File or Is it better to encode the encrypted data?If anybody having the sample code for Encoding/Decoding pls post it.