将一个listbox选中项移至另一个listbox 可以加一个BUTTON,选中这个ListBox1点BUTTON,在数据库中删除ListBox1的数据,同时插入到ListBox2的数据,操作完成后,重新绑定ListBox1和ListBox2的数据源 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 BUTTON我是加了~~可是还是有点疑惑~~~能留个Q么~~? 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> 按钮事件中写listBox项的添加删除事件listBox2.Items.Add(listBox1.SelectedItem.ToString());listBox1.Items.Remove(listBox1.SelectedItem);数据库的更改你自己搞定吧 我之前也用的这个可是不行啊~~~一上去就VSHOST停止工作~~~~ 哪位高手能够将一下两段PB代码翻译成C#语言? 急~~~~~!!!关于读写dat文件问题 SQLDMO 如何备份远程SQL数据到本地 我的端口丢失咯??? [★★100分★★]求微软 BizTalk2006 学习资料________[圣诞快乐][2] c# 开发access mysql mssql 数据导入导出的系统 请问一个我棘手的问题 请教: 一位数0-1的正则表达式, 马上给分! 请这里的专家帮忙 C#如何彻底清除硬盘所有数据?请指点 为什么用UDP写的传送文件的程序,文件大于2G就不行了? 如何将object[,]数组中的内容输出到txt文本中去?
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>
listBox2.Items.Add(listBox1.SelectedItem.ToString());
listBox1.Items.Remove(listBox1.SelectedItem);
数据库的更改你自己搞定吧