HTTP output stream

  • Thread starter Thread starter Dmitri Shvetsov
  • Start date Start date
D

Dmitri Shvetsov

Hi,

Does somebody have a working project-example to show image on a Web Form
writing the byte[] to a http stream and assigning the source of the image on
the form to this url?

I can't understand some logic, how can we write to a http stream and use
this stream in a client browser showing it as a picture.

I saw few examples on the Internet, but no one alive project, to compile and
see.

Dmitri
 
Dmitri Shvetsov said:
Does somebody have a working project-example to show image on a Web Form
writing the byte[] to a http stream and assigning the source of the
image on the form to this url?

By webform are you referring to ASP.net? Or what type of service are you
using for the HTTP server?


--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
"Programming is an art form that fights back"


ELKNews - Get your free copy at http://www.atozedsoftware.com
 
Hi Chad,

You know the task is pretty easy if know how to do that. In few words I need
to extract an Inage from a database and show on the form. I found a few
solutions on the internet about the same - Response.BinaryWrite() but it
doesn't work for me because I didn't find a whole working solution, just
fragments of examples. And I can't understand how to write this example to
get a working project.

As I understood I need to create an aspx web form and assign a type to a
image type, but how can I get the image that should be written to the http
stream? Did you see a good explanation of that? When I read an example
somewhere on the Internet it looks easily but I didn't see a whole project
to run and understand how it works.

Thanks.

Dmitri

Chad Z. Hower aka Kudzu said:
Dmitri Shvetsov said:
Does somebody have a working project-example to show image on a Web Form
writing the byte[] to a http stream and assigning the source of the
image on the form to this url?

By webform are you referring to ASP.net? Or what type of service are you
using for the HTTP server?


--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
"Programming is an art form that fights back"


ELKNews - Get your free copy at http://www.atozedsoftware.com
 
Dmitri Shvetsov said:
You know the task is pretty easy if know how to do that. In few words I
need to extract an Inage from a database and show on the form. I found a
few solutions on the internet about the same - Response.BinaryWrite()
but it doesn't work for me because I didn't find a whole working
solution, just fragments of examples. And I can't understand how to
write this example to get a working project.

An easier way is to write it to a temp file. Then make a URL to that, and let
IIS take care of streaming it.
As I understood I need to create an aspx web form and assign a type to a
image type, but how can I get the image that should be written to the
http stream? Did you see a good explanation of that? When I read an

I think it might be better to skip the webform, and just use a HTTP handler
instead. You would catch your URL, set the content type and just write
directly.

If your open to 3P solutions, IntraWeb extends ASP.net and this is one of the
features it offers is a DBImage control.

http://www.atozed.com/intraweb/


--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
"Programming is an art form that fights back"


ELKNews - Get your free copy at http://www.atozedsoftware.com
 
Back
Top