Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 269
  • Last Modified:

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.
0
searchsanjaysharma
Asked:
searchsanjaysharma
1 Solution
 
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

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Tackle projects and never again get stuck behind a technical roadblock.
Join Now