ASP WriteLineMethod
Complete TextStream Object Reference Manual
The WriteLine method writes a specified text and a newline character to a TextStream file.
Syntax
TextStreamObject.WriteLine(text)
| Parameters | Description |
|---|---|
| text | Optional. The text to write to the file. If you do not specify this parameter, a newline character is written to the file. |
Example
<%
dim fs,f
set fs=Server.CreateObject("Scripting.FileSystemObject")
set f=fs.CreateTextFile("c:\test.txt",true)
f.WriteLine("Hello World!")
f.WriteLine("How are you today?")
f.WriteLine("Goodbye!")
f.close
set f=nothing
set fs=nothing
%>
After executing the code above, the file test.txt looks like this:
Hello World!
How are you today?
Goodbye!
dim fs,f
set fs=Server.CreateObject("Scripting.FileSystemObject")
set f=fs.CreateTextFile("c:\test.txt",true)
f.WriteLine("Hello World!")
f.WriteLine("How are you today?")
f.WriteLine("Goodbye!")
f.close
set f=nothing
set fs=nothing
%>
After executing the code above, the file test.txt looks like this:
Hello World!
How are you today?
Goodbye!
Complete TextStream Object Reference Manual Other Extensions