可以加一个BUTTON,选中这个ListBox1点BUTTON
,在数据库中删除ListBox1的数据,同时插入到ListBox2的数据,操作完成后,重新绑定ListBox1和ListBox2的数据源 

解决方案 »

  1.   

    BUTTON我是加了~~可是还是有点疑惑~~~能留个Q么~~?
      

  2.   

    ondblclick, 使用js,删除这边的,添加另一边的。
    function MoveEmp(fromElement, toElementId)
        {
            if (fromElement.selectedIndex >= 0 && fromElement.selectedIndex < fromElement.options.length)
            {
                var selectedOption = document.createElement("OPTION");
                selectedOption.text = fromElement.options(fromElement.selectedIndex).text;
                selectedOption.value = fromElement.options(fromElement.selectedIndex).value;
                
                document.getElementById(toElementId).options.add(selectedOption);
                fromElement.options.remove(fromElement.selectedIndex);
                
                //刷新
                RefreshEmpNoTos();
            }
        }<asp:ListBox ID="EmpNoTos3" runat="server" Width="178px" Rows="5" ondblclick="MoveEmp(this, 'EmpNoTosSelector3');">
                    </asp:ListBox>
                    <asp:ListBox ID="EmpNoTosSelector3" runat="server" Width="178px" Rows="5" ondblclick="MoveEmp(this, 'EmpNoTos3');"
                        ForeColor="#999999"></asp:ListBox>
      

  3.   

    按钮事件中写listBox项的添加删除事件
    listBox2.Items.Add(listBox1.SelectedItem.ToString());
    listBox1.Items.Remove(listBox1.SelectedItem);
    数据库的更改你自己搞定吧
      

  4.   

    我之前也用的这个可是不行啊~~~一上去就VSHOST停止工作~~~~