myConnection.Open()
       dropDownList.DataSource = myCommand.SelectCommand.ExecuteReader
        DropDownList.DataTextField = "dqdm"
        DropDownList.DataValueField = "dqdm"        DropDownList.DataBind() '在此处放置初始化页的用户代码
        DropDownList.Items.Insert(0, New ListItem("全国", "all"))       dqdm = DropDownList.SelectedItem.Value为什么我取的dqdm 都是all 而不是其它绑定的数据

解决方案 »

  1.   

    DropDownList.Items.Add(0, New ListItem("全国", "all"))
      

  2.   

    dropDownList.DataSource = myCommand.SelectCommand.ExecuteReader(CommandBehavior.SchemaOnly);DropDownList.Items.Add(0, New ListItem("全国", "all"))
      

  3.   

    dropDownList.DataSource = myCommand.SelectCommand.ExecuteReader(CommandBehavior.SchemaOnly);
    这样子 我只能取一条记录了 我原来从数据库绑定的数据显示不出来了???
      

  4.   

    那你干吗不用myCommand.ExecuteNonQuery()?
    而且你的DataTextField和DataValueField取得是表中的同一列,你想做什么呢?
      

  5.   

    DataTextField和DataValueField取得是表中的同一列,你想做什么呢?即显示也取值
      

  6.   

    DataTextField和DataValueField取得是表中的同一列,你想做什么呢?即显示也取值
    myCommand.ExecuteNonQuery()?
    \怎么用