473,326 Members | 2,815 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,326 software developers and data experts.

Put a binary image into HtmlGenericControl

Hi,

I have in a database models of cars,

CarID int
CarName varchar
CarFeatures varchar
CarImage binary

I have a class Car that have the properties:
ID int
Name string
Features string
Image byte[]

My problem starts here:

i have into a page a

<span id=CarGenericControl runat=server>

and inside CarGenericControl.InnerHtml i have to show the Name, Features,
and Image foto of the car.

In this moment i show all the information except the foto, that i dont know
how to put it from byte[] into the Generic Control.

Do you have any advice for this specific case?

--
Thanks
Regards.
Josema
Nov 16 '05 #1
3 2380
Josema,

You need to create a bytearray in a page and than do in that page
Response.BinaryWrite(arrImage);

That page do you reference in your image.ImageUrl =
UrlFromMyCreatedBitmapPage;

I hope this helps?

Cor
Nov 16 '05 #2
Hi Cor, first of all thanks for your early response.

Actually i have a byte array with the image loaded from binary field
(database).

My problem is based on:

1) have all the info to show (the image into a byte array, and all the rest
of the data that comes from database, varchar, etc...). But i only can use a
page to display all this data. And all this data i have to show into a
HtmlGenericControl.
Actually i dont have problems to show tha string data. but im trying to put
into the property InnerHtml the byte[] variable to show the image, but
without success.

Any help would be appreciated.
Thanks Cor.
Regards.
josema.

"Cor Ligthert" wrote:
Josema,

You need to create a bytearray in a page and than do in that page
Response.BinaryWrite(arrImage);

That page do you reference in your image.ImageUrl =
UrlFromMyCreatedBitmapPage;

I hope this helps?

Cor

Nov 16 '05 #3
Josema,

I have seen a lot of people trying what you want to do (including me),
however AFAIK is it only possible to show the image using an imagebox (or
any other special object made for it as from macromedio).

However you never know that we both see an answer in half an hour.

Cor
Nov 16 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Maurizio Penna | last post by:
I, guys. I've embeded an image into a xml file, something like that: <display type="picture" mime="image/png" name = "mosaico6.png"> <!]> </display> Now, I want to display it with a XSL...
6
by: C K | last post by:
What is less expensive/intensive on the server -dynamically writing out my rollovers to an asp:literal, or to use asp:image tags for the images. My image names will be dynamic as I am building a...
0
by: VB Programmer | last post by:
I have 2 webforms. When I print out the page.Controls(1).tostring variable one says "HtmlForm", the other "HtmlGenericControl". How can I change the first one to "HtmlForm"? ?...
3
by: Arun | last post by:
Hi, I have simple question to ask. How to write multiple Binary files to the Browser using Asp.Net and Visual C#.net I have seen examples where single binary file is written to browser. ...
4
by: qualitynice | last post by:
HELP :-)... I'm creating an embedded activex object in an asp.net page using the HtmlGenericControl class. I'm doing this because when I tried to embed it directly in the aspx page, it stopped...
8
by: Randall Parker | last post by:
I want to generate an HTML tag that will look like: <a href="EquipmentServiceCreate.aspx?serial=X01">Create New Service For X01</a> or on a different instance where the user would be viewing...
4
by: Beginner | last post by:
How do I convert JPEG images to binary files in ASP.NET? Please advice. Thanks.
2
by: Rik Brooks | last post by:
I have a web page that has a placeholder on it called PlaceHolderText. I read some html out of the database. The value for my test is: this is <strong>a test </strongof the html stuff I read...
6
by: aznimah | last post by:
hi, i'm work on image comparison. i'm using the similarity measurement which i need to: 1) convert the image into the binary form since the algorithm that i've use works with binary data for the...
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
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
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: 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: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
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.