How to dynamically add images to repeater.

I have a database : dbimages.
Table : mstimages (contains one field imageid and path)
con - sqlconn
I want to assign all images to repeater.
searchsanjaysharmaAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
YZlatCommented:
you have two options: adding image via ItemTemplate or via code-behind.

ItemTemplate is simpler:

<ItemTemplate>
<asp:Image ID='<%#
Container.DataItem("ImgID") %>' Runat="Server" ImageUrl='<%#
Container.DataItem("ImgPath") %>'/>
</ItemTemplate>
0
 
searchsanjaysharmaAuthor Commented:
ok
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.