首页 > 解决方案 > 在 c#.net 中的转发器中具有 2 个表行和数据字段的标题模板

问题描述

中继器控件的标题模板中是否可以有两行。第一个表行只是标签,但表的第二行包含数据库值。代码如下。在此,我只能看到第一行标题和项目模板值。没有显示带有数据库值的第二行标题。谢谢

              <asp:Repeater ID="Repeater3" runat="server">
                     <HeaderTemplate>
                 <table class="auto-style30" style="border: thin hidden #FFFFFF" hidden="hidden">
                <tr>
               
                    <td class="auto-style57" style="border: thin double #000000; background-color: #FFFFFF;">
                        <asp:Label ID="Label129" runat="server" Font-Bold="False" ForeColor="#003366" Text="Roll No"></asp:Label>
                    </td>
                    <td class="auto-style132" style="border: thin double #000000;">
                   
                        <asp:Label ID="Label130" runat="server" ForeColor="#003366" Text="UOM"></asp:Label>
                    </td>
                    <td class="auto-style170" style="border: thin double #000000;">
                        <asp:Label ID="Label131" runat="server" ForeColor="#003366" Text="Class"></asp:Label>
                    </td>
                    <td class="auto-style55" style="border: thin double #000000;">
                    
                        <asp:Label ID="Label132" runat="server" ForeColor="#003366" Text="Vendor"></asp:Label>
                    </td>
                    <td class="auto-style170" style="border: thin double #000000;">
                        <asp:Label ID="Label133" runat="server" ForeColor="#003366" Text="Buyer"></asp:Label>
                    </td>
                    <td class="auto-style93" style="border: thin double #000000;">
                     
                        <asp:Label ID="Label134" runat="server" Font-Bold="False" ForeColor="#003366" Text="S Stock"></asp:Label>
                     
                        </td>
                    <td class="auto-style171" style="border: thin double #000000;">
                        <asp:Label ID="Label135" runat="server" ForeColor="#003366" Text="MOQ"></asp:Label>
                    </td>
                    <td class="auto-style172" style="border: thin double #000000;">
                      
                        <asp:Label ID="Label136" runat="server" ForeColor="#003366" Text="O/H"></asp:Label>
                      
                        </td>
             
                

                </tr>
                  <tr>
                    
                    <td class="auto-style57" style="border: thin double #000000; background-color: #FFFFFF;">
                        &nbsp;</td>
                    <td class="auto-style132" style="border: thin double #000000;">
                   
                        &nbsp;</td>
                    <td class="auto-style170" style="border: thin double #000000;">
                        &nbsp;</td>
                    <td class="auto-style55" style="border: thin double #000000;">
                    
                        &nbsp;</td>
                    <td class="auto-style170" style="border: thin double #000000;">
                        &nbsp;</td>
                    <td class="auto-style93" style="border: thin double #000000;">
                     
                        &nbsp;</td>
                    <td class="auto-style171" style="border: thin double #000000;">
                        &nbsp;</td>
                    <td class="auto-style172" style="border: thin double #000000;">
                      
                        &nbsp;</td>
                    <td class="auto-style172" style="border: thin double #000000;">
                        &nbsp;</td>
                    <td class="auto-style172" style="border: thin double #000000;">
                      
                        &nbsp;</td>
                    <td class="auto-style172" style="border: thin double #000000;">
                      
                        &nbsp;</td>
                    <td class="auto-style172" style="border: thin double #000000;">
                      
                        &nbsp;</td>
                    <td class="auto-style172" style="border: thin double #000000;">
                      
                        &nbsp;</td>
                    <td class="auto-style172" style="border: thin double #000000;">
                      
                        &nbsp;</td>
                    <td class="auto-style172" style="border: thin double #000000;">
                      
                         <%# Eval("BUCKET_BF") %></td>
                    <td class="auto-style172" style="border: thin double #000000;">
                      <%# Eval("BUCKET_BF") %></td>  
             
                       
                    <td class="auto-style172" style="border: thin double #000000;">
                        <%# Eval("BUCKET_BF") %></td>
                    <td class="auto-style172" style="border: thin double #000000;">
                      
                         <%# Eval("BUCKET_BF") %></td>
                    <td class="auto-style172" style="border: thin double #000000;">
                      
                         <%# Eval("BUCKET_BF") %></td>
                    <td class="auto-style172" style="border: thin double #000000;">
                      
                         &nbsp;</td>
                    <td class="auto-style172" style="border: thin double #000000;">
                      
                          <%# Eval("BUCKET_BF") %></td>
                    <td class="auto-style172" style="border: thin double #000000;">
                      
                          <%# Eval("BUCKET_BF") %></td>
                    <td class="auto-style172" style="border: thin double #000000;">
                      
                         <%# Eval("BUCKET_BF") %></td>
                    <td class="auto-style172" style="border: thin double #000000;">
                      
                           <%# Eval("BUCKET1") %></td>    
                    <td class="auto-style172" style="border: thin double #000000;">
                      
                          <%# Eval("BUCKET1") %></td>    
                    <td class="auto-style172" style="border: thin double #000000;">
                      
                           <%# Eval("BUCKET1") %></td>    
                    <td class="auto-style172" style="border: thin double #000000;">
                      
                          <%# Eval("BUCKET1") %></td>    
                   
                     
                </tr> 
        </Header template>
      <item template>
         <tr>
           </tr>
     </table>
        </item template>

标签: c#

解决方案


推荐阅读