By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,899 Members | 1,350 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,899 IT Pros & Developers. It's quick & easy.

HTTP output stream

P: n/a
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
Nov 15 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
"Dmitri Shvetsov" <ds*******@cox.net> wrote in
news:lpsWb.39407$P17.18747@fed1read03:
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

Nov 15 '05 #2

P: n/a
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" <cp**@hower.org> wrote in message
news:Xn******************@127.0.0.1...
"Dmitri Shvetsov" <ds*******@cox.net> wrote in
news:lpsWb.39407$P17.18747@fed1read03:
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

Nov 15 '05 #3

P: n/a
"Dmitri Shvetsov" <ds*******@cox.net> wrote in
news:skzWb.39696$P17.1819@fed1read03:
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

Nov 15 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.