Read file content line by line using ASP
by Nirmala[ Edit ] 2009-08-20 11:08:12
Hi...
Use the below code to read file content line by line using ASP.
<%
Set fs=Server.CreateObject("Scripting.FileSystemObject")
Set f=fs.OpenTextFile(Server.MapPath("README.txt"), 1)
do while f.AtEndOfStream = false
Response.Write(f.ReadLine)
Response.Write("<br>")
loop
f.Close
Set f=Nothing
Set fs=Nothing
%>