嗨,我有一个 3 层嵌套中继器,我需要在回发时访问下面的中继器 condRptr 中的值,我尝试了所有方法,但似乎无法到达任何地方。我最初在转发器中使用了标头模板中带有 runat 服务器的表,但这引发了错误。
任何人有任何想法?
<asp:Repeater ID="deptRepeater" runat="server" OnItemDataBound="bindDepts">
<HeaderTemplate>
</HeaderTemplate>
<ItemTemplate>
<div id="itemContainer">
<h3 class="fdAccordionHeader"><%# Eval("desc") %><span class="fdAccordionHeaderIcon"></span></h3><asp:HiddenField ID="deptid" runat="server" Value='<%# Eval("dept_id") %>' />
<div class="fdAccordionContent" style="display:none">
<asp:Repeater ID="prodRepeater" runat="server" OnItemCommand="itemToCart">
<HeaderTemplate>
</HeaderTemplate>
<ItemTemplate>
<div>
<h4 class="fdProductHeader"><span class="fdProductHeaderTitle"><%# Eval("desc") %></span><span class="fdProductFeatured"></span><span class="fdProductHeaderPrice">€<%# Eval("price") %></span><span class="fdClearBoth"></span></h4>
<div class="fdProductContent" style="display:none">
<img class="fdProductImage" src="http://wingit.ie/script/app/web/img/frontend/noimg.png" alt="">
<div class="fdProductContentRight">
<div class="fdProductDesc">A helping of our delicious wings, served with fries and a drink of your choice. Perfect if you're particularly hungry!</div>
<input type="hidden" name="product_id" value="2">
<!--<a href="#" class="fdButton fdButtonOrder"></a>-->
<asp:LinkButton ID="btnOrder" runat="server" CssClass="fdButton fdButtonOrder" CommandName="addToCart" CommandArgument='<%# Eval("product") %>' ></asp:LinkButton>
<table id="condimentsContainer" cellpadding="0" cellspacing="0" runat="server">
<asp:Repeater ID="condRptr" runat="server">
<ItemTemplate>
<tr><td>
<table id='condiments' cellpadding="0" cellspacing="0" class="fdProductExtraTbl" runat="server">
<tbody>
<tr>
<td><%# Eval("pDesc") %></td>
<td class="fdProductExtraTblPrice"><asp:Label ID="priceLvl" runat="server">€<%# Eval("pPrice") %> x</asp:Label>
<input id="modifier" class="modifier" type="text" name="extra_id[3]" value="0" runat="server"/>
<input id="hdProd" type="hidden" value='<%# Eval("pCode") %>' runat="server"/>
</td>
<td class="fdProductExtraTblIco"><a href="#" data-eid="3" data-pid="2" class="fdProductExtraIcon fdProductExtraIconPlus"></a></td>
<td class="fdProductExtraTblIco"><a href="#" data-eid="3" data-pid="2" class="fdProductExtraIcon fdProductExtraIconMinus"></a></td>
</tr>
</tbody>
</table>
</td></tr>
</ItemTemplate>
</asp:Repeater>
</table>
</div>
<span class="fdClearLeft"></span>
</div>
</div>
</ItemTemplate>
<FooterTemplate>
</FooterTemplate>
</asp:Repeater>
</div>
</div>
</ItemTemplate>
<FooterTemplate>
</FooterTemplate>
</asp:Repeater>