select *
from table
where ........
where中的条件是CheckBoxList中选中的值
怎么实现?
谢谢

解决方案 »

  1.   

    string aaa=RadioButtonList1.SelectedItem.Text.trim();
    参考这个代码
    select *
    from table
    where xxx='"+aaa+"'
      

  2.   

    好像不行
    CheckBoxList中选中的是多个值
      

  3.   

    BoxList中循环各项,按选中的项拼出sql语句的条件。
      

  4.   


    foreach(ListItem i in CheckBoxList1.Items)
    {
    if(i.Selected)
    {
                                              Response.Write("<script>alert('"+i.Text+"')</script>");
                        }
    }
      

  5.   

    for(int i=0;i<CheckBoxList1.Items.Count;i++){
        if(CheckBoxList1.Items[i].Selected){
            xxx=xxx+" AND "+CheckBoxList1.Item[i].Text;
    }
    }
      

  6.   

    能具体点吗
    我想从CheckBoxList中选得值传到存储过程中,
    在存储过程中判断在存储过程中的接受值的变量应该是什么类型的?