asp.net 如何实现DropDownList+checkBoxList的效果

2025-01-06 05:16:25
推荐回答(1个)
回答1:

string s=DropDownList1.SelectedValue;
foreach (CheckBox c in CheckBoxList1.Items)
{
if (c.Checked)
s += "," + c.Text;
}
cmd.CommandText = "SELECT ....... tsr in ("+s+") ORDER BY.....";