asp.net.ph

Response.BinaryWrite Method

System.Web Namespace   HttpResponse Class


Writes a string of binary characters to the HTTP output stream.

[ VB ]
Public Sub BinaryWrite ( _
   ByVal buffer ( ) As Byte _
)

[ C# ]
public void BinaryWrite (
   byte [ ] buffer
);

[ C++ ]
public: void BinaryWrite (
   unsigned char buffer __gc [ ]
);

[ JScript ]
public function BinaryWrite (
   buffer : Byte [ ]
);

Parameters

buffer
The bytes to write to the output stream.

Example

The following example shows how you can write the string of binary characters from an image column to the HTTP output stream.

void Page_Load ( object o, EventArgs e ) {
   string id = Request.Params [ "id" ];
   byte [ ] logo = ( byte [ ] ) fetchScalar (
      "select logo from pubs_pub_info where pub_id='" + id + "'" );
   Response.ContentType = "image/GIF";
   Response.BinaryWrite ( logo );
}
  C# VB

 Show me 

See Also

Request.BinaryRead   HttpResponse Members Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph