Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7696615
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T21:49:18+00:00 2026-05-31T21:49:18+00:00

Basically I have a database with two tables, that is, Updates table and Images

  • 0

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 🙂

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T21:49:19+00:00Added an answer on May 31, 2026 at 9:49 pm

    Use a Repeater inside each ItemTemplate of the main repeater and Bind the new repeater to the images collection of each update record

    <asp:Repeater runat="server" ID="rptrUpdates">
       <ItemTemplate>
               <asp:Repeater runat="server" ID="rptrImages">
                 <ItemTemplate>
                   <img src="<%#Eval("imgUrl")"/>
                 </ItemTempate>
               </asp:Repeater>
       </ItemTempate>
    </asp:Repaeter>
    

    and in code behind inside in ItemDataBound event of main repeater bind the child one

    protected void rptrUpdates_ItemDataBound(object sender, RepeaterItemEventArgs e)
    {
       if(e.Item.ItemType == ListItemType.Item || item.ItemType == ListItemType.AlternatingItem)
       {
          Repeater rptrImages = (Repeater)e.Item.FindControl("rptrImages");
          rptrImages.DataSource = ((Updates)e.Item.DataItem).Images;
          rptrImages.DataBind();
       }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two tables: Transactions and TransactionAgents. TransactionAgents has a foreign key to Transactions
I have a database that has two tables. These two tables are defined as:
so I have this problem. My Database has two tables that look something like
Let's say I have a Type II SCD database, that is basically append only.
I basically have three tables, posts, images and postimages (this simply contains the ids
I currently have a database structure with two important tables. 1) Food Types (Fruit,
I have a table in a SQL Server 2005 Database that is used a
I have two tables: CREATE TABLE [dbo].[Context] ( [Identity] int IDENTITY (1, 1) NOT
So I have this application in ASP MVC 3. My database has two tables:
So I have these two tables in my database: Companies -------------------- CompanyID (PK) Name

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.