Please note, this is a STATIC archive of website www.w3schools.com from 05 May 2020, cach3.com does not collect or store any user information, there is no "phishing" involved.
THE WORLD'S LARGEST WEB DEVELOPER SITE

ASP WriteLine Method


❮ Complete TextStream Object Reference

The WriteLine method writes a specified text and a new-line character to a TextStream file.

Syntax

TextStreamObject.WriteLine(text)

Parameter Description
text Optional. The text to write to the file. If you do not specify this parameter, a new-line character will be 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
%>

The file test.txt will look like this after executing the code above:

Hello World!
How are you today?
Goodbye!

❮ Complete TextStream Object Reference