|
Output Object |
|
See Also: |
The Output.Close() method closes the output stream.
VBScript:
JScript:
There are two methods to open the output stream (Open() and setting the Stream property). Close() is the only method to close the stream.
Output.Close() is implicitly called if the output file path is changed using the Filename, Dir, or Path properties.
If content is generated after Output.Close() is called, the output stream will be reopened using Output.Open(), as described in the Output.Open() documentation.
The following example creates two text files. The Output.Close() call is unnecessary, since changing the output file path implicitly closes the output stream.
<%#
Output.Filename = "foo.txt"
Output.Write "FooBar"
' Close the current output file, so we can create a new one.
' (This call is unnecessary.)
Output.Close
Output.Filename = "hello.txt"
Output.Write "Hello World!"
#%>