ASP 101 - Active Server Pages 101 - Web06
The Place ASP Developers Go!

Please visit our partners


Windows Technology Windows Technology
15 Seconds
4GuysFromRolla.com
ASP 101
ASP Wire
VB Forums
VB Wire
WinDrivers.com
internet.commerce internet.commerce
Partners & Affiliates














ASP 101 is an
internet.com site
ASP 101 is an internet.com site
IT
Developer
Internet News
Small Business
Personal Technology

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers

ASP 101 News Flash ASP 101 News Flash





ASP Source Code:
<%
' Declare variables for the File System Object and the File to be accessed.
Dim objFSO, objTextFile
' Create an instance of the the File System Object and assign it to objFSO.
Set objFSO = CreateObject("Scripting.FileSystemObject")
' Open the file
'Set objTextFile = objFSO.OpenTextFile("C:\InetPub\PR86027\samples\textfile.txt")
Set objTextFile = objFSO.OpenTextFile(Server.MapPath("textfile.txt"))
Do While Not objTextFile.AtEndOfStream
	Response.Write objTextFile.ReadLine & "<BR>" & vbCrLf
Loop
' Close the file.
objTextFile.Close
' Release reference to the text file.
Set objTextFile = Nothing
' Release reference to the File System Object.
Set objFSO = Nothing
%>
<BR>
<A HREF="./textfile_w.asp">Write to the text file</A><BR>

Back the the Sample Output

Back to the Sample Index


Home |  News |  Samples |  Articles |  Lessons |  Resources |  Forum |  Links |  Search |  Feedback

Internet.com
The Network for Technology Professionals

Search:

About Internet.com

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers