Inserting DropBox and Label
Go to View
| Toolbox
, type Dro
, and selectDropDownList
, as shown in the following screenshot:


Figure 3.6.1: Select DropDownList from Toolbox
From Toolbox
, drag DropDownList
into the form, and under DropDownList
, also place a Label
so that your screen looks like the one shown in the following screenshot:

Figure 3.6.2: Default.aspx with DropDownList and Label inserted in the page
DropDownList
allows us to choose from among several options. Next, switch over to the Design
view:

Figure 3.6.3: In the Design view, you can see that the label needs to be pushed down to the next line
Notice that Label
needs to be pushed down to the next line. So, type in <br/>
, which can push the label down to its own line:
<asp:DropDownList ID="DropDownList1" runat="server"></asp:DropDownList> <br />
Populating the drop-down list
In the Design
View, you can see the Label
control is now below the box, as shown in Figure 3.6.4. Now, if you click on the little arrow...