本帖最后由 chjyezi 于 2012-06-27 18:03:05 编辑

解决方案 »

  1.   

    如果“无”是最后一项:
    <asp:CheckBoxList ID="CheckBoxList3" runat="server" AutoPostBack="True" onselectedindexchanged="CheckBoxList3_SelectedIndexChanged">
    <asp:ListItem>耳机</asp:ListItem>
    <asp:ListItem>充电器</asp:ListItem>
    <asp:ListItem>电池</asp:ListItem>
    <asp:ListItem>无</asp:ListItem>
    </asp:CheckBoxList>
    protected void CheckBoxList3_SelectedIndexChanged(object sender, EventArgs e)
    {
    if (CheckBoxList3.Items[CheckBoxList3.Items.Count - 1].Selected)
    for (int i = 0; i < CheckBoxList3.Items.Count - 1; i++)
    CheckBoxList3.Items[i].Selected = false;
    }
      

  2.   

    AutoPostBack="True" 去掉,这个是选择后自动回发,所以会刷新
      

  3.   

    把它放到 无刷新那ajax控件上
      

  4.   

    肯定得刷新 你用的是后台 代码 来控制前台,当你 后台代码执行完后,必须重新加载页面,才能显示出你后台代码实现的效果,要达到不刷新就的用JS 来控制的,JS 是前台,也就是客户端 运行的, 
      

  5.   

    要无刷新的改成这样:
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <ContentTemplate>
    <asp:CheckBoxList ID="CheckBoxList3" runat="server" AutoPostBack="True" OnSelectedIndexChanged="CheckBoxList3_SelectedIndexChanged">
    <asp:ListItem>耳机</asp:ListItem>
    <asp:ListItem>充电器</asp:ListItem>
    <asp:ListItem>电池</asp:ListItem>
    <asp:ListItem>无</asp:ListItem>
    </asp:CheckBoxList>
    </ContentTemplate>
    </asp:UpdatePanel>
    </form>
      

  6.   

    表单中其他select还是像闪屏一样。如何解决?