ListBox多先框将选中项连接成字符串
string strCellno = "";
foreach (ListItem item in this.LBdel.Items)
{
strCellno += "'" + item.Value.ToString() + "'";
strCellno += ",";
}
//for (int s = 0; s < deptList.Count; s++)
//{
// strDept += "'" + deptList[s].ToString() + "'";
// strDept += ",";
//}
strCellno = strCellno.Remove(strCellno.Length - 1, 1);//去掉最後一個‘,’
foreach (ListItem item in this.LBdel.Items)
{
strCellno += "'" + item.Value.ToString() + "'";
strCellno += ",";
}
//for (int s = 0; s < deptList.Count; s++)
//{
// strDept += "'" + deptList[s].ToString() + "'";
// strDept += ",";
//}
strCellno = strCellno.Remove(strCellno.Length - 1, 1);//去掉最後一個‘,’