Home > DeveloperSection > Blogs > DropDownList in ASP .Net

DropDownList in ASP .Net


ASP.Net ASP.Net 
Ratings:
0 Comment(s)
 2157  View(s)
Rate this:

Declaring a DropDownList in ASP .Net:

   A simple declaration for DropDownList can be done as below.

<asp:DropDownList ID="DropDownList1" runat="server">

</asp:DropDownList>

  If we want to add some items statically it can be added inside the Page as follows.

<asp:DropDownList ID="DropDownList1" runat="server">

<asp:ListItem>Select</asp:ListItem>

<asp:ListItem>1</asp:ListItem>

      <asp:ListItem>2</asp:ListItem>

      <asp:ListItem>3</asp:ListItem>

</asp:DropDownList>


Don't want to miss updates? Please click the below button!

Follow MindStick