473,327 Members | 1,976 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

HTTP output stream

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
3 2101
"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
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
"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Trevor | last post by:
Hello, Please bear with me, I am trying to learn C++. I am implementing some error/debug functions which format a message and output it to a C++ stream. I would like to design it using one low...
12
by: Matt Garman | last post by:
I'd like to create a "custom output facility". In other words, I want an object whose use is similar to std::cout/std::cerr, but offers more flexibility. Instead of simply writing the parameter...
6
by: William Payne | last post by:
Hi, I have a function declared as: void foo(const std::string& s, std::ostream& verbose_output); I want foo() to write a lot of data to the ostream if it's a valid stream. If it's valid or not...
6
by: radnoraj | last post by:
Hi, I am sucessfull in redirecting console output to a file. but in this case nothing is displayed on the console, cout output is written to file without display. how do write the output to...
3
by: Fernando Arbeiza | last post by:
Hi: I need some clarification about a code like this: printf("%s", "a string with NO trailing newline"); scanf("%d", &i); Regarding if a fflush() of the standard output is needed or not. I...
6
by: Fredrik | last post by:
How can I download a binary file (like .doc or .pdf) from http to my harddrive using the .net framework? WebRequest objRequest = System.Net.HttpWebRequest.Create(url); objResponse =...
6
by: Microsoft News | last post by:
Hi, I have been using several http server code examples from the web, include one from msdn, and I can't seem to get a simple http server thread working. I can connect the server successful...
5
by: Brad | last post by:
I created a base page class which sets a response filter and the filter injects additional html into the response output stream. The filter works fine and everything works as expected except for...
10
by: Johannes Barop | last post by:
Hi, I want to format the output of a 'std::ostream', but i dont know how to do it . Example: int main() { my_out << "Hi.\nI'am a" << " Computer."; my_out << "Nice.";
4
by: ed | last post by:
Hi all, I'm very new to vb (2nd day) and I need to create a small app that will replace my old batch file with a flashy gui. I had some experience with access 2.0 which helps ;) What I would...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.