Read certain line from a text file?
Hi all, I have a txt file stored on my server. I need to display the data from the file on the web browser. I understand there is functions like ".ReadLine", ".ReadAll", ".SkipLine" ... Now, in my text file, there are 3 lines. I need to display the first and third lines first, then display the second line. Eg:
In my text file:
==================
My name is Bob.
I have a pet.
I am 21 years old.
In web browser, it should display like this:
=============================================
My name is Bob.
I am 21 years old.
I have a pet.
How can I do that? I tried to use .SkipLine to skip the second line ("I have a pet") in text file, but end up error message saying it has reach end of file. HELP!!!
|