"select  *  from  app_project  where  c_focus=" & focus &"  order  by  c_id  desc"

解决方案 »

  1.   

    问题:我想从下拉列表框中取值,选用的DropDownList控件,代码如下:<asp:DropDownList  id="isfocus"  runat="server">  
     <asp:ListItem  Value="all">全部</asp:ListItem>  
     <asp:ListItem  Value="1">焦点</asp:ListItem>  
     </asp:DropDownList>  
    运行时想从浏览器看到的是”全部、焦点“,而取值时得到的是”all、1“。我的解决办法:
    我用的是focus=isfocus.selecteditem.value 或focus=isfocus.selecteditem.text,可是我得到的总是DropDownList控件显示的值”全部、焦点“。我也在page_load中加入了相应代码:        If  Not  IsPostBack  Then  
                                 Dim  myList    As  New  ArrayList()  
                                 myList.Add("全部")  
                                 myList.Add("焦点")  
                                   isfocus.DataSource  =  myList  
                                 isfocus.DataBind()  
                   End  If
    最后,请你告诉我问题在那呢?????????
      

  2.   

    用一个collection派生出来的类来存放你的信息
    用dropdownlist的 DataTextField 和DataValueField 属性来制定你需要显示和返回的值
      

  3.   

    你的page_load中不该再绑定了。