C# 在中继器内时文本框值不改变
我有以下中继器:C# 在中继器内时文本框值不改变,c#,asp.net,vb.net,C#,Asp.net,Vb.net,我有以下中继器: <asp:Repeater ID="rprCartItems" runat="server"> <ItemTemplate> <tr class="product-row"> <asp:HiddenField ID="hfQty" value="0" runat="server
<asp:Repeater ID="rprCartItems" runat="server">
<ItemTemplate>
<tr class="product-row">
<asp:HiddenField ID="hfQty" value="0" runat="server" />
<td class="product-col">
<figure class="product-image-container">
<a href="product.html" class="product-image">
</a>
</figure>
</td>
<td class="td-price">$<span class="price"><%# Container.DataItem("price") %></span></td>
<td class="tr-quantites">
<span data-qty="<%# Container.DataItem("quantity") %>" style="display:none"></span>
<span class="availableQty" style="display:none"><%# Container.DataItem("availableQty") %></span>
<asp:TextBox CssClass="vertical-quantity form-control" ID="txtQty" runat="server"></asp:TextBox>
</td>
<td class="td-total">$<span class="total"><%# Container.DataItem("price") * Container.DataItem("quantity") %></span></td>
</tr>
<tr class="product-action-row">
<td colspan="4" class="clearfix">
<%-- <div class="float-left">
<a href="#" class="btn-move">Move to Wishlist</a>
</div><!-- End .float-left -->--%>
<div class="float-right">
<asp:LinkButton CommandName="remove" CommandArgument='<%# Container.DataItem("id") %>' title="Remove from cart" cssClass="btn-edit text-danger" ID="removeItem" runat="server"><span class="sr-only">Remove</span><i class="fa fa-times"></i></asp:LinkButton>
<asp:LinkButton CommandName="update" CommandArgument='<%# Eval("id") %>' title="Remove from cart" cssClass="btn-edit text-danger" ID="LinkButton1" runat="server"><span class="sr-only">Remove</span><i class="fa fa-times"></i></asp:LinkButton>
</div><!-- End .float-right -->
</td>
</tr>
</ItemTemplate>
</asp:Repeater>
或c#
但是,文本框文本中的更改没有反映出来。如果文本框有一个默认文本,这就是Msgbox中的内容
有什么想法吗
谢谢
<asp:TextBox CssClass="vertical-quantity form-control" ID="txtQty" runat="server"></asp:TextBox>
Dim t As TextBox = TryCast(e.Item.FindControl("txtQty"), TextBox)
MsgBox(t.Text)
TextBox t = e.Item.FindControl("txtQty") as TextBox;