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

  • SEARCH
  • Home
  • 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 6477119
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T06:54:33+00:00 2026-05-25T06:54:33+00:00

I have a Repeater control that adds rows to a table. The data inside

  • 0

I have a Repeater control that adds rows to a table. The data inside each cell comes from a Datatable that is bound to the repeater.

Simplified Example:

<asp:Repeater ID="Repeater1" runat="server">
  <ItemTemplate>
   <tr>
     <td>
        <%# DataBinder.Eval(Container.DataItem, "PartNumber")%>
     </td>
     <td>
         <%# DataBinder.Eval(Container.DataItem, "Quantity")%>
     </td>
   </tr>
</ItemTemplate>

In code behind I would like to be able to loop through each repeater row and get the value for Quantity for that row.

So far all I have is:

foreach (RepeaterItem ri in Repeater1.Items)
{

} 
  • 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-25T06:54:33+00:00Added an answer on May 25, 2026 at 6:54 am

    You could use labels:

    <td>      
        <asp:Label ID="lblPartNumber" runat="server" Text='<%#Eval("PartNumber")%>' />      
    </td>      
    <td>      
        <asp:Label ID="lblQuantity" runat="server" Text='<%#Eval("Quantity")%>' />     
    </td>  
    

    And grab the values of the labels on the repeater OnItemDataBound event.

    protected void repeater_OnItemDataBound(object sender, RepeaterItemEventArgs  e)
    {
        if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem) 
        {
            foreach (Control c in e.Item.Controls)
            {
                if (c is Label)
                {
                    // Grab label
                    Label lbl = c as Label;
                    String your_value = lbl.Text;
                }
            }
        }    
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a .NET repeater control that is data-bound to a List. As part
I have a Repeater control that is being bound to the result of a
I have a user control in a repeater that I need to pass data
I have a repeater control that generates a list of links from a SqlReader.
I have a repeater control that repeats a DevExpress ASPxGridView for every item bound
I have my Items table bound to the repeater control. What if I want
I have a nested repeater control that displays a list of data, in my
I have a user control that contains a repeater. It seems that data cannot
I have a repeater control that contains an ItemTemplate containing a databound label and
I have a Repeater control that loads instances of a custom control I have

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.