1

我有这种类型的代码Gridview..UpdatePanel现在当我检查时CheckBox它会触发它的OnSelectedIndexChanged事件但是当我选择两个或三个CheckBox然后取消选中选中的任何复选框时它的 OnSelectedIndexChanged事件不会被触发..为什么会发生这种情况

       <asp:Label ID="lbltempCity" runat="server" Text="City"></asp:Label>
      <asp:CheckBoxList ID="lst" AutoPostBack="true" runat="server" Width="100px" Height="100px" BorderWidth="1px" BackColor="White" OnSelectedIndexChanged="hello">
                                    <asp:ListItem>Test1</asp:ListItem>
                                    <asp:ListItem>Test2</asp:ListItem>
                                     <asp:ListItem>Test1</asp:ListItem>
                                    <asp:ListItem>Test2</asp:ListItem>
                                    </asp:CheckBoxList>
 <asp:DropDownExtender ID="DropDownExtender1" runat="server" DropArrowWidth="300px" TargetControlID="lbltempCity" DropDownControlID="lst">
                                    </asp:DropDownExtender>
                                </HeaderTemplate>
            <ItemTemplate>
    <asp:Label ID="lblCity" runat="server" Text='<%# Eval("tempCity") %>'></asp:Label>
            </ItemTemplate>
                            <ItemStyle Width="15%" />
                            </asp:TemplateField>
4

1 回答 1

0

我测试了它工作正常的代码。问题的原因可能是网格或页面中的任何其他控件。发布完整的代码,以便我们提供帮助。

于 2012-12-04T20:18:42.103 回答