Link to home
Start Free TrialLog in
Avatar of sergeiweerasuriya
sergeiweerasuriya

asked on

How to programatically access rows in a repeater control

I have the following repeater control. What I nned to do is get all the HistoryDateTime field values from all the rows and put them in an array or a list so that I can do some processing in the code behind file. I use vb.net. I do not know how to access rows in a repeater.

<div class="history">
        <ul>
            <asp:Repeater id="rptStatus" runat="server" OnItemCreated="rptStatus_ItemCreated">
              <ItemTemplate>
                 <li>
                 
                     <div class="top">
                         <asp:Label ID="lblStatus" CssClass="status" Text='<%#Eval("Status")%>' runat="server"></asp:Label>
                         <asp:Image ID="ImgArrow" CssClass="arrow" runat="server"  ImageUrl="~/Images/arrow.gif"/>
                     </div>  
                     
                     <div class="bottom">
                        <asp:Label ID="lblHistoryDate" CssClass="date" Text='<%#Eval("HistoryDateTime", "{0:d}")%>'
                                       runat="server">
                        </asp:Label>
                     </div>
                                         
                  </li>                    
              </ItemTemplate>              
            </asp:Repeater>
        </ul>
    </div>
SOLUTION
Avatar of Faizan Sarwar
Faizan Sarwar
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial