Search Search

#1 worldwide
FREE Coding Lessons

since 1996
   THE BEST WAY to learn ASP & Asp.net!
Advertise Here!
click for details
Credits Host:
DiscountASP.net
Server Admin:
The "Team"
Contact Info.
Charles M. Carroll

my Blog
[prev. Lesson]  New Features in VBScript version5
     [next Lesson]  Text Files: Writing Them on Server

Text File Reading

   filename=/learn/test/txtread.asp

<Test Script Below>


<html><head>
<TITLE>txtread.asp</TITLE>
</head><body bgcolor="#FFFFFF">
<%
whichfile=server.mappath("/aspheader.asp")

Set fs = CreateObject("Scripting.FileSystemObject")
Set thisfile = fs.OpenTextFile(whichfile, 1, False)

counter=0
do while not thisfile.AtEndOfStream
    counter=counter+1
    thisline=thisfile.readline
    response.write thisline & "<br>"
loop

thisfile.Close
set thisfile=nothing
set fs=nothing
%>
</body></html>

Chaz Wish List
Tall Tip $5
Grande Tip $20
Venti Tip $39
Tip Jar Thanks
2004 Thanks
2005 Thanks
HUGE Tip -love site