Regarding " reading text files"
Hi friends
I have a text file "temp.txt" and I would like to use asp to read the first 3 lines and display using response.write.
the following prg reads the whole file
<%
Set fs=Server.CreateObject("Scripting.FileSystemObject ")
Set f=fs.OpenTextFile(Server.MapPath("testread.txt"), 1)
do while f.AtEndOfStream = false
Response.Write(f.ReadLine)
Response.Write("<br>")
loop
f.Close
Set f=Nothing
Set fs=Nothing
%>
But I need to read the first 3 line only ,
please help
Praveen
|