<div> <asp:DropDownList ID="DropDownList1" runat="server"> <asp:ListItem>A</asp:ListItem> <asp:ListItem>B</asp:ListItem> <asp:ListItem>C</asp:ListItem> <asp:ListItem></asp:ListItem> </asp:DropDownList> <asp:DropDownList ID="DropDownList2" runat="server"> </asp:DropDownList> </div>
protected void Page_Load(object sender, EventArgs e) { // Code for show DropDownList2 values from DropDownList1 }
foreach(ListItem item in DropDownList1.Items) DropDownList2.Items.Add(item);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)