DropDownList1.DataSource=....
DropDownList1.DataTextField = "item_name"  
 DropDownList1.DataValueField = "item_code" 
DropDownList1.DataBind();

解决方案 »

  1.   

    其中item_name和item_code是表示分别的数组吗?
      

  2.   

    foreach(DataRow row in table.Rows)
    {
    string str=((int)(row[0])).ToString();
    string str1=((int)(row[1])).ToString();
    DropDownListyear.Items.Add(new ListItem(str1, str));
    }
      

  3.   

    item_name和item_code是数据库中对应的字段。DropDownList1.DataTextField ---->textDropDownList1.DataValueField----->value
      

  4.   

    可以这样呀,
    dropdownlist1.items.insert(i,数组的值)
    dropdownlist1.items.item(i).value=数组的值