How to swap ddl's selected value on buton click
Eg User has Selected One from ddl1 and three from ddl2 then when the user clicks the Button the values should be swapped.
User Selected
DD1 DD2
One Three
After Swap button click
DD1 DD2
Three One
<asp:DropDownList ID="ddl1" runat="server">
<asp:ListItem>One</asp:ListItem>
<asp:ListItem>Two</asp:ListItem>
<asp:ListItem>Three</asp:ListItem>
</asp:DropDownList>
<asp:DropDownList ID="ddl2" runat="server">
<asp:ListItem>One</asp:ListItem>
<asp:ListItem>Two</asp:ListItem>
<asp:ListItem>Three</asp:ListItem>
</asp:DropDownList>
<asp:Button ID="Button1" runat="server" Text="Swap" onclick="Button1_Click" />