ALP Response.BinaryWrite method
Writes the content of the variant without any conversion.


Response.Write variant


variant - It must be of type VT_ARRAY | VT_UI1.

This method is designed for use when using a component that generates binary data. One example can be a simple component that helps to send files to the browser or a component that generates an image.



  var obj = Server.CreateObject("SomeBin.Component");
  var binData = obj.DataGenerationMethod();


This method requires additional care. Allowing the script to generate additional textual output (through Response.Write or directly) may corrupt the data sent. For example trailing bytes appended to an image streamed binary. It is good idea to use Response.End()   at the end of the script and Response.Clear() at the beginning in order to avoid any other output you may add in a mistake.

Applies to: Response object

See also: Response.End, Response.Clear

newObjects Copyright 2001-2006 newObjects [ ]