How to embed image control in a repeater?

M

Matthew Law

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.DataItem,
"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.
 
G

Guest

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,189
Latest member
CryptoTaxSoftware

Latest Threads

Top