everyone! I m writing repeater control on my web-page. After I added data paging for repeater I have got problem: ImageButton does nt fire any more OnItemCommand event of repeater. Why?
这里是标记法的一部分:
<asp:Repeater ID="PartsRepeater" runat="server"
OnItemCommand="partsRepeater_ItemCommand"
OnItemDataBound="partsRepeaterItem_Bound">
<HeaderTemplate>
<table rules="all" cellspacing="0" style="border-color: rgb(31, 77, 48);
border-style: solid; width: 100%; border-collapse: collapse;">
<tr >
<td style="width: 92%;">
<table cellspacing="0" border="0" style="border-color: rgb(31, 77, 48); border-style: solid;
width: 100%; border-collapse: collapse;">
<tr style="background-color: #1f4d30; color: white;">
<td style="width: 10%;">
<asp:Label runat="server" Text="Name" ID="lblName">
</asp:Label>
</td>
<td style="width: 10%;">
<asp:Label runat="server" Text="Number" ID="Label64">
</asp:Label>
</td>
<td style="width: 10%;">
<asp:Label runat="server" Text="Category" ID="Label65">
</asp:Label>
</td>
<td style="width: 20%;">
<asp:Label runat="server" Text="Description" ID="Label66">
</asp:Label>
</td>
<td style="width: 20%;">
<asp:Label runat="server" Text="Models" ID="Label67">
</asp:Label>
</td>
<td style="width: 5%;">
<asp:Label runat="server" Text="Price" ID="Label68">
</asp:Label>
</td>
<td style="width: 5%;">
<asp:Label runat="server" Text="A Qty" ID="Label69">
</asp:Label>
</td>
<td style="width: 5%;">
<asp:Label runat="server" Text="B Qty" ID="Label70">
</asp:Label>
</td>
<td style="width: 5%;">
<asp:Label runat="server" Text="Actual Qty" ID="Label71">
</asp:Label>
</td>
<td style="width: 5%;">
<asp:Label runat="server" Text="Total Qty" ID="Label72">
</asp:Label>
</td>
<td style="width: 5%;" >
</td>
</tr>
</table>
</td>
<td style="width: 8%;" >
</td>
</tr>
</HeaderTemplate>
<ItemTemplate>
<tr style="border-color: #1f4d30;"
>
<td style="width: 92%;">
<table border="0" cellspacing="0" class="PartsRepeater_InnerTable">
<tr class="PartsRepeater_InnerTable">
<td style="cursor: pointer; width: 10%;" class="PartsRepeater_InnerTable">
<asp:HiddenField runat="server" ID="PartID" Value= <%# Bind("PartID") %> Visible="false" />
<asp:LinkButton runat="server" ID="Label52" Text= <%#Eval("Name").ToString()%> CommandArgument= <%# Eval("PartID") %> >
</asp:LinkButton>
</td>
<td style="cursor: pointer; width: 10%;" class="PartsRepeater_InnerTable">
<asp:LinkButton ID="Label45" runat="server" Text= <%#Eval("Number").ToString().ToUpper()%>
CommandArgument= <%# Eval("PartID") %> >
</asp:LinkButton>
</td>
<td style="cursor: pointer; width: 20%;" class="PartsRepeater_InnerTable">
<asp:LinkButton ID="Label46" runat="server" Text= <%#Eval("Category").ToString()%>
CommandArgument= <%# Eval("PartID") %> >
</asp:LinkButton>
</td>
<td style="cursor: pointer; width: 20%;" class="PartsRepeater_InnerTable">
<asp:LinkButton ID="Label47" runat="server" Text= <%# GetPartDescr((String)Eval("Description"))%>
CommandArgument= <%# Eval("PartID") %> >
</asp:LinkButton>
</td>
<td style="cursor: pointer; width: 5%;" class="PartsRepeater_InnerTable">
<asp:LinkButton ID="Label48" runat="server" Text= <%# GetPartDescr((String)Eval("ModelName")) %>
CommandArgument= <%# Eval("PartID") %> >
</asp:LinkButton>
</td>
<td style="cursor: pointer; width: 4%;" class="PartsRepeater_InnerTable">
<asp:LinkButton ID="Label49" runat="server" Text= <%# GetPrice(Eval("Price").ToString(), Eval("sPrice").ToString(), Eval("Price3").ToString())%>
CommandArgument= <%# Eval("PartID") %> >
</asp:LinkButton>
</td>
<td style="cursor: pointer; width: 4%;" class="PartsRepeater_InnerTable">
<asp:LinkButton ID="lblAQTY" runat="server" Text= <%#Eval("AGradeQty").ToString()%>
CommandArgument= <%# Eval("PartID") %> >
</asp:LinkButton>
</td>
<td style="cursor: pointer; width: 4%;" class="PartsRepeater_InnerTable">
<asp:LinkButton ID="lblBQty" runat="server" Text= <%# int.Parse(Eval("QtyInStock").ToString()) - int.Parse(Eval("AGradeQty").ToString())%>
CommandArgument= <%# Eval("PartID") %> >
</asp:LinkButton>
</td>
<td style="cursor: pointer; width: 4%;" class="PartsRepeater_InnerTable">
<asp:LinkButton ID="lblActualQTY" runat="server" Text= <%#Eval("ActualQty").ToString()%>
CommandArgument= <%# Eval("PartID") %> >
</asp:LinkButton>
</td>
<td style="cursor: pointer; width: 4%;" class="PartsRepeater_InnerTable">
<asp:LinkButton ID="Label60" runat="server" Text= <%#Eval("QtyInStock").ToString()%>
CommandArgument= <%# Eval("PartID") %> >
</asp:LinkButton>
</td>
</tr>
<tr >
<td colspan="15" style="cursor: pointer; width: 5%;">
<asp:LinkButton ID="Label63" runat="server" Text= <%#Eval("priceModificationDate").ToString()%>
Font-Size="Smaller" CommandArgument= <%# Eval("PartID") %> >
</asp:LinkButton>
</td>
</tr>
</table>
</td>
<td style="width: 8%">
<table>
<tr>
<td style="cursor: pointer; width: 50%;" class="PartsRepeater_InnerTable">
<asp:ImageButton ID="btnEdit" runat="server" ImageUrl="~/Images/edit.png" CausesValidation="False"
CommandName="editRow" CommandArgument= <%# Eval("PartID") %> OnClientClick= SaveScrollPositions >
</asp:ImageButton>
</td>
<td style="cursor: pointer; width: 50%;">
<asp:ImageButton ID="btnDelete" runat="server" OnClientClick= <%# GetConfirmMessage(Eval("Name"))%>
ImageUrl="~/Images/delete.png" CausesValidation="False" CommandName="Delete"
CommandArgument= <%# Eval("PartID") %> ></asp:ImageButton>
</td>
</tr>
</table>
</td>
</tr>
</ItemTemplate>
<FooterTemplate>
</table>
</FooterTemplate>
</asp:Repeater>