ASP » Response » BinaryWrite

Syntax:
Response.BinaryWrite(Data)
Data
The Data argument is the data to send to the HTTP output.

The BinaryWrite method sends specific data to the current HTTP output without any character conversions.

The BinaryWrite method writes nonstring data (binary data) to the current HTTP output without any character set conversion.

This method can use the output of the Request.BinaryRead method. For example, you could retrieve an image from a database with Request.BinaryRead and send it to a client using Response.BinaryWrite.

There is one mandatory argument.

Examples

Code:
-------------------File1.asp------------------
<HTML>
<HEAD>
</HEAD>
<BODY>
<form action="File2.asp" method="POST">
Name:<input type="Text" name="name" maxlength="30"><BR>
Age:<input type="Text" name="age" maxlength="10"><BR>
Sex:<input type="Text" name="Sex" maxlength="10"><BR>
<input type="Submit" name="submit" value="submit"><BR>
</form>
</BODY>
</HTML>
 
-------------------File2.asp------------------
<%
bytecount = Request.TotalBytes
binread = Request.BinaryRead(bytecount)
Response.BinaryWrite binread
%>
Output:
name=Jane&age=25&Sex=Female&submit=submit