First, let's put a button inside an HTML file. For this, go toView | Toolboxand select Button, as shown in in the following screenshot:
Figure 3.4.1: Selecting Button from Toolbox
Now drag Button and drop it into the page, right below form, as seen in the following screenshot. As the purpose of aButtoncontrol would be to click on it, we can fill ListBox using a for loop. Keep this in mind; this is the objective here.
Figure 3.4.2: The Button line has been dragged into the page below form
Change the displayed text such that it says, for example, FillBox, so that the purpose is clear. Next, type a <br>tag to break down FillBox and bring it down to the next line. Then, after Button, put ListBox. So type listb in the SearchToolbox box, as shown in the following screenshot:
Figure 3.4.3: Types of lists available in Visual Studio