Setting up the beginning interface
Let's begin with a simple markup, like the one shown in the following screenshot, and into it we will place a button and a label:

Figure 5.2.1: Our simple beginning markup
Go to View
| Toolbox
, and drop in a Button
control and a Label
control beneath it. Now, put a <br>
tag after the Button
line, remove the text that says Button
between the double quotes, and replace it with Show
, or something along those lines. Next, remove the text
attribute of the Label
control so that it goes away. Your Default.aspx
page should now look similar to the following screenshot:

Figure 5.2.2: The modified mark with a button and a label
Now, in the Design
view, we have a very simple interface consisting of a Button
control and a Label
control , as shown in the following screenshot:

Figure 5.2.3: Our simple interface in the Design view
Creating an array of strings
Double-click on the Show button to bring up the event handler. Here, we'll create our code; so enter the following...