How to add the listItems in dropdownList

Amatya
Posted by Amatya under ASP.NET category on | Points: 40 | Views : 899
ASP code to add the listItems in dropdownList

 <asp:DropDownList ID="ddlMonth" runat="server" AutoPostBack="True" CssClass="normal">
<asp:ListItem Value="0">-Select-</asp:ListItem>
<asp:ListItem Value="1">JANUARY</asp:ListItem>
<asp:ListItem Value="2">FEBRUARY</asp:ListItem>
<asp:ListItem Value="3">MARCH</asp:ListItem>
<asp:ListItem Value="4">APRIL</asp:ListItem>
<asp:ListItem Value="5">MAY</asp:ListItem>
<asp:ListItem Value="6">JUNE</asp:ListItem>
<asp:ListItem Value="7">JULY</asp:ListItem>
<asp:ListItem Value="8">AUGUST</asp:ListItem>
<asp:ListItem Value="9">SEPTEMBER</asp:ListItem>
<asp:ListItem Value="10">OCTOBER</asp:ListItem>
<asp:ListItem Value="11">NOVEMBER</asp:ListItem>
<asp:ListItem Value="12">DECEMBER</asp:ListItem>
</asp:DropDownList>&nbsp;</td>


Thanks
Amatya

Comments or Responses

Login to post response