>Hi,
>
>Thank for your help. Suppose my text file contain like this:
>
>Hello....
>Good morming.
>
>
>So when the html page read the text file....how does it know have to go to the next line? Instead of displaying Hello....Good morning.
>
>Thanks.
>
>regards
>Kusnardi
Hello Kusnardi,
By default, as Naomi points out, the carriage returns and line breaks in your text file will be ignored as the contents of the test file are placed into the HTML stream.
You have two options. One is to parse the text file as you read it, and insert the appropriate
< P > and < BR >
tags, as Naomi suggests. This can be a little complicated if the file is exceptionlly large, or contains a lot of formatting.
The second thing you can do is use the
< PRE > < /PRE >
HTML tags. Essentially, any text that gets inserted between these two tags is rendered as is, including all carriage returns and line breaks, when placed in the HTML stream. The quick way to accomplish what you are trying to do is to dump the contents of the text file between these tags when writing to the browser.