Basically I have a database with two tables, that is, Updates table and Images table.
The images table is associated with the Updates table through a foreign key “Update_ID”.
Now, in my page, I have a repeater which shows all the entries in the Updates table. What I want to do is to display all the images associated with each and every Update_ID in the repeater control.
The problem is that each Update_ID can have as many images as one wants associated with it. If there was only one image per update_ID then there would be no problem as I would allocate one Image control and that’s it. However, I don’t know how many Image controls I am going to have.
How can I show the images associated with each update_ID in its respective repeater? Thanks 🙂
Use a
Repeaterinside eachItemTemplateof the main repeater and Bind the new repeater to the images collection of each update recordand in code behind inside in
ItemDataBoundevent of main repeater bind the child one