复制DropDownList

        DropDownList ddlA;
        ListItem[] ar = new ListItem[ddlB.Items.Count];
        ddlB.Items.CopyTo(ar,0);
        ddlA.DataSource = ar;
        ddlA.DataTextField = "text";
        ddlA.DataValueField = "value";
        ddlA.DataBind();

你可能感兴趣的:(复制DropDownList)