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

ASP Write Method

ASP Write Method


TextStream Object Reference Complete TextStream Object Reference Manual


The Write method writes specified text to a TextStream file.

**Note:** The text this method writes to a TextStream file has no spaces or line breaks between the strings.

Syntax

TextStreamObject.Write(text)

Parameters Description
text Required. The text to write to the file.

Example

<%

dim fs,f

set fs=Server.CreateObject("Scripting.FileSystemObject")

set f=fs.CreateTextFile("c:\test.txt",true)

f.write("Hello World!")

f.write("How are you today?")

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?


TextStream Object Reference Complete TextStream Object Reference Manual