绑定DropDownList

        DropDownList1.DataSource = dt; 获取的DataTable
        DropDownList1.DataTextField = "ItemName"; //dropdownlist的Text的字段
        DropDownList1.DataValueField = "Number";//dropdownlist的Value的字段
        DropDownList1.DataBind();
posted @ 2012-11-13 14:10  武沛齐  阅读(197)  评论(0编辑  收藏  举报