APGen Documentation Previous Topic: CachedFile.Open() Next Topic: Legal Information Parent Topic: CachedFile Object    CachedFile Object
CachedFile.Write()
See Also:

Writes the contents of the cached file to the ASP Response object.

Syntax

VBScript:

cachedFile.Write [ oResponse ]

JScript:

cachedFile.Write( [ oResponse ] );

Object

cachedFile A CachedFile object.

Parameters

oResponse Optional object parameter - the default is Nothing.  If an object is passed in, it will receive the contents of the file using its IStream or ASP Response interface.

Passing in the ASP Response object for this parameter makes the Write() method slightly faster than if it is omitted.  If this parameter is not specified, the ASP ObjectContext is used to obtain the ASP Response object.

Notes

If an oResponse parameter is passed in, the contents of the cached file are written to its IStream interface.  If an IStream interface is not found, the contents are written to the ASP Response interface.  You can pass in any object that implements the IStream interface.

If the oResponse parameter is omitted, the MTS or COM+ ObjectContext object is used to find the ASP Response object.  The overhead in doing this is higher than if the Response object is passed in.

If the oResponse object cannot be written to, or if an ASP Response object can not be found, an error is raised.