Bineesh  Viswanath

Bineesh Viswanath

  • NA
  • 1k
  • 777.9k

Sort DropDownList in ASP.NET

Aug 24 2013 12:21 AM
Sir, I want your help in the Sorting of DropDownList in ASP.NET.

I just coded as :-

<asp:DropDownList ID="ddlCountry" runat="server" Width="126px">
        <asp:ListItem>Argetina</asp:ListItem>
        <asp:ListItem>canada</asp:ListItem>
        <asp:ListItem>Germany</asp:ListItem>
        <asp:ListItem>China</asp:ListItem>
        <asp:ListItem>Hungary</asp:ListItem>
        <asp:ListItem>Egypt</asp:ListItem>
        <asp:ListItem>Australia</asp:ListItem>
        <asp:ListItem>England</asp:ListItem>
       
IS there any way to Sort these Items?

Answers (10)