62,041
社区成员
发帖
与我相关
我的任务
分享
<asp:DropDownList ID="SearchDeptDrop" runat="server">
</asp:DropDownList>
DataTable Depts=getDepts();
foreach (DataRow dr in Depts.Rows)
{
ListItem LI = new ListItem();
LI.Value = dr[0].ToString();
LI.Text = dr[1].ToString();
SearchDeptDrop.Items.Add(LI);//添加选项进DropDowdList
}