DropDownList1.selectedItem.value?
或许你应该给出相关代码来...

解决方案 »

  1.   

    '动态装载下拉列表
     Sub checkstate_Load()
            search.SelectCommand.CommandText = "Select kValue,kContent from KeyWord where Kname = 'CheckState'"
            search.SelectCommand.Connection = DBConnection        Dim DS As DataSet
            DS = New DataSet()        search.Fill(DS, "checks")
            Cstate.DataSource = DS.Tables("checks").DefaultView
            Cstate.DataBind()
        End Sub'根据选择的条件查询,在datagrid中显示查询结果
        Sub loca_data()
            search.SelectCommand.CommandText = "Select * from NormalInfo where CheckState=@statevalue"
            
            search.SelectCommand.Connection = DBConnection        search.SelectCommand.Parameters.Add(New SqlClient.SqlParameter("@statevalue", SqlDbType.Int, 4))
            search.SelectCommand.Parameters("@statevalue").Value = Cstate.SelectedItem.Value        Dim DS As DataSet
            DS = New DataSet()        search.Fill(DS, "stataval")
            CheckData.DataSource = DS.Tables("stataval").DefaultView
            CheckData.DataBind()    End Sub
      

  2.   

    我直接用 "Select * from NormalInfo where CheckState ='"&Cstate.SelectedItem.Value &"'"的
      

  3.   

    如果你是在Page_Load里面绑定DropDownList的,那就把绑定的代码放在IsPostBack块里面。
      

  4.   

    你刷新dropdownlist的选中按钮了吗??否则当然每次都是查出第一个被默认的值呀!!!
      

  5.   

    谢谢icyer()的提醒,是我疏忽了,没有把绑定到DropDownList的过程,放在
    Page_Load的 If Not IsPostBack Then 中间。
    OK了。