Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

ASP WriteLine Method

ASP WriteLine Method


TextStream Object Reference Complete TextStream Object Reference Manual


The WriteLine method writes 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 argument, 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!


TextStream Object Reference Complete TextStream Object Reference Manual