1
Answer

Display Image

Photo of Guru Prasad 0

Guru Prasad 0

18y
1.9k
1

 

 

I am new to web development

 

I want to show image[ photo ] of an employee along with all other information of the employee. i am using Asp.Net 2003.

Plz give some idea ?

 

Response.BinaryWrite(data); //byte[] data

 

This gives the picture but in a new page mean blank page where all other information of the employee is missing.

 

Mainly I want programmatically add image to a control.

 

Please help me to do my job

 

I am waiting…………………  

Answers (1)

0
Photo of oupoi
NA 12 0 18y
Image on a web page (the <img> tag) is only a url reference of image file.

To show a byte-array-image on a web page, you should export the byte-array to a temporary file and then assign the corresponding image url to your image control.

However, handling the temporary image files may lead to some extra works.

I suggest to use the internal frame (iframe). Just write the byte-arry-image to the iframe similar to what you did.