J'ai un répéteur à l'intérieur d'un contrôle utilisateur.Utilisateur dans la page shoppingcart.aspx.Je souhaite accéder à tous lblPrice à partir de javascript à partir d'une fonction à l'intérieur du panier .aspx.Comment accéder à toutes ces étiquettes.étiquette d'accès à l'intérieur d'un répéteur ItemTemplate qui est à l'intérieur d'un usercontrol de asp.net page
<asp:Repeater ID="rptShoppingCart" runat="server">
<HeaderTemplate>
<tr class="big_header_style">
<td>
Product(s)
</td>
<td>
Description</td>
<td>
Quantity</td>
<td>
Price (INR)</td>
<td>
Total (INR)</td>
<td>
Remove?</td>
</tr>
</HeaderTemplate>
<ItemTemplate>
<tr class="dg_item_style">
<td align="center">
<img src='<%# Page.ResolveUrl(Convert.ToString(DataBinder.Eval(Container.DataItem,"ProductInfo.thumbnailPath1")))%>'
width="90" height="90" /></td>
<td>
<asp:Label ID="lblProductName" runat="server" Text='<%#DataBinder.Eval(Container.DataItem,"ProductInfo.productName") %>'></asp:Label></td>
<td align="center">
<input id="proQuantity" runat="server" type="text" size="1" value='<%#Eval("Quantity") %>' /></td>
<td align="center">
<strong class="redtxt">
<asp:Label ID="lblPrice" runat="server" Text='<%#GetPrice((BAL.ShoppingCartMaster)Container.DataItem)%>' /></strong></td>
<td align="center">
<strong class="redtxt">
<asp:Label ID="lblTotal" runat="server" Text='<%#calculatePrice((BAL.ShoppingCartMaster)Container.DataItem)%>'></asp:Label></strong>
</td>
<td align="center">
<asp:CheckBox runat="server" ID="cbRemoveFromCart" />
<asp:Label id="lblShoppingCartID" runat="server" visible="false" text='<%#Eval("ShoppingCartID") %>'></asp:Label>
</td>
</tr>
</ItemTemplate>
</asp:Repeater>
Désolé de ne pas utiliser jquery et de ne pas utiliser de page maître. – Rohit
alors vous pouvez utiliser la propriété ClientId. – Mahin
Non, vous ne pouvez pas utiliser ClientID pour les contrôles à l'intérieur d'un répéteur. –