私はショッピングカートを表すリピーターを持っています。このショッピングバスケットには、「数量の更新」と「アイテムの削除」ボタンがあります。リピータのDefaultButtonには、テキストボックスとボタンがありますか?
数量を編集して入力をクリックすると、アイテムの削除ボタンを使用する場所とは異なり、数量の更新ボタンを使用する必要があります。
コードでは、DefaultButtonで「QuantityPanel」を追加してコードを修正しようとしましたが、これで問題は解決しません。
アイデア?
私のコード:テキストボックスに入力して押したときにjQueryを使用して
<asp:Repeater ID="ProductBasketRepeater" runat="server"
onitemcommand="ProductBasketRepeater_ItemCommand"
onitemdatabound="ProductBasketRepeater_ItemDataBound1">
<ItemTemplate>
<tr class="BasketEntryItem">
<td class="ImageCol">
<asp:Image ID="ProductImageBox" runat="server" Width="50" />
</td>
<td class="NameCol">
<asp:HyperLink ID="ProductNameHyperlink" runat="server"></asp:HyperLink>
</td>
<td class="PriceCol">
<asp:Label ID="PriceLabel" runat="server"></asp:Label>
</td>
<td class="QuanCol">
<asp:Panel ID="QuantityPanel" runat="server" DefaultButton="UpdateQuantityBtn">
<asp:TextBox ID="QuantityBox" runat="server" Width="30px"></asp:TextBox>
<asp:LinkButton ID="UpdateQuantityBtn" runat="server" Text="Opdater" CommandName="UpdateQuantity"></asp:LinkButton>
</asp:Panel>
</td>
<td class="TotalCol">
<asp:Label ID="TotalPriceLabel" runat="server"></asp:Label><br />
<asp:Button ID="DeleteProductBtn" runat="server" Text="Slet" CommandName="Delete" />
</td>
</tr>
</ItemTemplate>
<SeparatorTemplate>
</SeparatorTemplate>
</asp:Repeater>
ありがとうございました - それは仕事をしました:-)リピータには問題ありません。ありがとう! –