Solved

How to dynamically add images to repeater.

Posted on 2012-03-26
3
260 Views
Last Modified: 2012-06-21
I have a database : dbimages.
Table : mstimages (contains one field imageid and path)
con - sqlconn
I want to assign all images to repeater.
0
Comment
Question by:searchsanjaysharma
3 Comments
 
LVL 20

Accepted Solution

by:
BuggyCoder earned 500 total points
ID: 37769776
0
 
LVL 35

Expert Comment

by:YZlat
ID: 37771187
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
 

Author Closing Comment

by:searchsanjaysharma
ID: 37771849
ok
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
This is a video describing the growing solar energy use in Utah. This is a topic that greatly interests me and so I decided to produce a video about it.
Need to grow your business through quality cloud solutions? With everything required to build a cloud platform and solution, you may feel like the distance between you and the cloud is quite long. Help is here. Spend some time learning about the Con…

914 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now