ASP WriteMethod


TextStream 对象参考手册Complete TextStream Object Reference

The Write method writes specified text to a TextStream file.

Note:This method writes text to a TextStream file without spaces or line breaks between each string.

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 above code, the file test.txt appears as follows:

Hello World!How are you today?


TextStream 对象参考手册Complete TextStream Object Reference Other extensions