初级问题啊!

解决方案 »

  1.   

    插入?
    不是帮数据库的内容显示到dropdownlist?
      

  2.   

    在MSDN上察看:
    DropDownList.SelectedItem  
    DropDownList.SelectedValue  
    的介绍
      

  3.   

    选择dropdownlist中的一个内容,然后把它插入到数据库啊
      

  4.   

    Insert Tb_XXXX (Field_x) value (DropDownList.SelectedValue.tostring())
      

  5.   

    Insert Tb_XXXX (Field_x) value (DropDownList.SelectedItem.text.tostring())要插入选择的文本内容的 话!
      

  6.   

    在MSDN上察看:
    DropDownList.SelectedItem  
    DropDownList.SelectedValue  
    的介绍
      

  7.   

    第一获取选择值:
    DropDownList.SelectedValue
    第二步 插入数据库
    sql语句 insert into 数据表(字段名)values(DropDownList.SelectedValue)
      

  8.   

    第三步:
    OleDbCommand comm = GetCommand();
                    OleDbDataAdapter ada = GetDataAdapter();                comm.Connection = conn.VOleConn();
                    comm.CommandText = sql;//刚刚写的sql语句
                    comm.CommandType = commandtype;
    comm.ExecuteNonQuery();
    即可