Jul 04 2001

Reading from a textfile in ASP

Posted by admin under Filehandling

This example uses the opening function described here.

<%
Dim oFile
	
Set oFile = File_OpenExisting( "c:\test.txt", File_OpenForReading )
If oFile Is Nothing Then
	Response.Write "Not existing"
Else
	Response.Write "Existing"
	While Not oFile.AtEndOfStream
		Response.Write oFile.ReadLine()& "<br>"
	Wend
	oFile.Close
End If
%>