473,327 Members | 1,979 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.

How to embed image control in a repeater?

Hi,

I have a repeater in my vb.net page which needs to render an image
control (it's a mappoint linedrive map image). The repeater itself is
bound to an array of object 'Directions' which contains mostly
strings, but one of the Properties of the Direction Class is an image
of type System.Web.UI.WebControls.Image.

Obviously, if I try to render it in the repeater with the same
technique used for a string:

<%# Convert.ToString(DataBinder.Eval(Container.DataIte m,
"LDMapImage")) %>

I get a string of 'System.Web.UI.WebControls.Image' instead of the
image itself.

I know I can do this with a table control but code using a repeater is
already in place so I'd prefer to use it. Can I do this with a
repeater and if so how?

Many thanks in advance,

Matthew.
Nov 18 '05 #1
1 2370
M K
You need to get the uri of the image into the repeater. Is 'LDMapImage' an object? And if so, can you get the path/uri/url attribute of it? Maybe LDMapImage.Path or something like that?

"Matthew Law" wrote:
Hi,

I have a repeater in my vb.net page which needs to render an image
control (it's a mappoint linedrive map image). The repeater itself is
bound to an array of object 'Directions' which contains mostly
strings, but one of the Properties of the Direction Class is an image
of type System.Web.UI.WebControls.Image.

Obviously, if I try to render it in the repeater with the same
technique used for a string:

<%# Convert.ToString(DataBinder.Eval(Container.DataIte m,
"LDMapImage")) %>

I get a string of 'System.Web.UI.WebControls.Image' instead of the
image itself.

I know I can do this with a table control but code using a repeater is
already in place so I'd prefer to use it. Can I do this with a
repeater and if so how?

Many thanks in advance,

Matthew.

Nov 18 '05 #2

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

Similar topics

4
by: nicholas | last post by:
Got an asp.net data-repeater on my page. I can view the texts from the database (ex.: <%# Databinder.Eval(Container.DataItem, "contentEN") %> ), but I also would like to see the image, but only if...
6
by: WebMatrix | last post by:
Hello, Here's the situation (I'll try to be brief as possible) I am working on the control which is created dynamically based on XML string. This control consists of a table with number of rows...
3
by: Jim via DotNetMonster.com | last post by:
Hi, I have the location of an image in the database and I'm displaying it with a repeater control. I'd like to add the width and height and I'm not sure what the best way to do it is. I could...
1
by: snicks | last post by:
I have a series of XLS files which I need to embed into a PowerPoint presentation on an IIS server. I’ll be using VB.NET. I’ve tried using an ASPOSE.PowerPoint control to do this and it does...
0
by: Milsnips | last post by:
hi there, i have a repeater with 1 image control. I also have a function that generates a dynamic thumbnail from an image, and returns it as a stream, but i cant figure out how to bind it to the...
3
by: BB | last post by:
Hi, I am using repeater control.in my aspx page. one of the column of control displays images. Filenames of images are stored in table. Now when I run it and if display Image is blank. I see place...
2
by: sanju | last post by:
Hi, I am struggling to replace a bit value 'True' or 'False' with a image true.gif or false.gif and bind it to a repeater control. I am getting values 'true' or 'false' depending on whether...
0
by: Sully | last post by:
Hi Guys, I have this about 98% done and I cannot get it work properly. I have a Repeater bound to a MySQL DataSource, inside the Repeater I have an ImageButton, outside the repeater I have a...
1
by: vikastcser | last post by:
Hi I have a image in a Repeater.I have to display some value in its alternate text property along with the text. The value is accesed as <%#(Container.DataItem.Amt)%> as it is in repeater. Can...
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...
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)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
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.