2016-11-08 45 views
0

我在中繼器 內創建表格,並且數據顯示正確,它將是兩個記錄,如下圖所示。在表格和asp:repeater中實現手風琴

enter image description here 我想要什麼:當用戶點擊存款編號時(如例16)如何製作手風琴,新表將出現幷包含數據。

這是中繼器的第一中繼代碼:

<asp:Repeater ID="rptDep" runat="server" > 
    <HeaderTemplate> 
     <table class="table table-hover table-striped table-condensed table-bordered table-responsive"> 
      <tr> 
       <th>Deposit No.</th> 
       <th>Custom Declaration No.</th> 
       <th>Category</th> 
       <th>Location</th> 
       <th>Goods Description</th> 
       <th>Units Balance</th> 
       <th>WT Balance</th> 
       <th>Goods Balance Amount(LC)</th> 
      </tr> 
    </HeaderTemplate> 
    <ItemTemplate> 
     <tr> 
      <td><a href="#"> <%#Eval("depNo") %></a></td> 
      <td><%#Eval("customDec") %></td>  
      <td><%#Eval("category") %></td> 
      <td><%#Eval("location") %></td> 
      <td><%#Eval("goodDesc") %></td> 
      <td><%#Eval("unitsBal") %></td> 
      <td><%#Eval("wtBal") %></td> 
      <td><%#Eval("lcBal") %></td>     
     </tr> 
    </ItemTemplate> 
    <FooterTemplate> 
     </table> 
    </FooterTemplate> 
</asp:Repeater> 

我知道,這將是第二個轉發器,但如何實現,或如何使用foreach語句?

+0

你在靶向:的WinForms,WPF,ASP ..? __Always__正確標記您的問題! – TaW

+0

asp.net C#@TaW –

回答