Ya better write bit by bit
string _filePath = "..."
Response.Clear();
Response.ContentType = "image/gif";
Response.Buffer = false;
FileStream _fileStream = null;
byte[] _buffer = new byte[1024];
long _byteCount;
try
{
_fileStream = File.OpenRead(_filePath);
while ((_byteCount =
_fileStream.Read(_buffer, 0, _buffer.Length)) > 0)
{
if(Response.IsClientConnected)
{
Response.OutputStream.Write(
_buffer, 0, _buffer.Length);
Response.Flush();
}
else
{
return;
}
}
}
catch(Exception _ex)
{
throw _ex;
}
finally
{
_fileStream.Close();
}
--Daniel
http://staff.newtelligence.com/danielf/
-----Original Message-----
From: Kevin Spencer [mailto:ke***@DIESPAMMERSDIEtakempis.com]
Posted At: Monday, January 23, 2006 1:01 PM
Posted To: microsoft.public.dotnet.framework.aspnet
Conversation: BLOB in asp
Subject: Re: BLOB in asp
1. Create an ASP.Net page that will serve as an image. Use the
Request.QueryString to determine the file name. You can then add an
image
tag to any page that points to its URL as it would point to an image
file.
Example:
<img src="image.aspx?filename=foo.gif">
Read the data from the BLOB into a byte array. Set the
Response.ContentType
of the page to "image/gif" Use Response.BiaryWrite to write the byte
array
to the output stream.
--
HTH,
Kevin Spencer
Microsoft MVP
..Net Developer
Who is Mighty Abbott?
A twin turret scalawag.
"Nau" <na***********@gmail.com> wrote in message
news:11**********************@g43g2000cwa.googlegr oups.com...
I forgot to mention that i have a 'gif ' image stored in the
database(oracle 9i) in a BLOB column , i need to display this data in
a asp page