DataBinding images using Repeater Control. Is there an ImageField column?

  • Thread starter Thread starter Charlie@CBFC
  • Start date Start date
C

Charlie@CBFC

Hi:

Is it possible to databind an image in Repeater Control? I see support for
it in GridView, but not in Repeater control. There is another way to do
this, but would rather go with new controls.

Thanks,
Charlie
 
In the past when I have had the need to do this, the easiest way is to
put a placeholder in your repeater, then in the ItemDataBound event,
manually add a System.Web.Image control into the placeholder.

Perhaps someone has an easier way/more effecient way, I've always used
that method in the past.

Hope this Helps!

Sean
 
Charlie,

You can use databinding expression in item template to databind any
properties of any controls. Did you try?
 
Yeah but image control only binds to a url. My images are stored in
database in binary fields. It can be done with an HTTP handler.

Charlie

Eliyahu Goldin said:
Charlie,

You can use databinding expression in item template to databind any
properties of any controls. Did you try?

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]


Charlie@CBFC said:
Hi:

Is it possible to databind an image in Repeater Control? I see support
for it in GridView, but not in Repeater control. There is another way to
do this, but would rather go with new controls.

Thanks,
Charlie
 
Back
Top