Setting up the HTML for this project
So, here create a new project as shown in Figure 6.20.1 (I have eliminated the <div>
tag lines, as we won't be needing them):

Figure 6.20.1: The starting HTML for our project
First, let's put a Button
control into the project form, as follows:
<asp:Button ID="Button1" runat="server" Text="Update Labels" /><br />
Next, change the Text
property in the Button
markup to read Update Labels
. Post this, put Label
controllers under this Button
control. You can keep the one that's there already, but we'll add a couple of other ones. So, change the ID
property on the existing Label
markup to say mainLabel
, as follows:
asp:Label ID="mainLabel" runat="server"></asp:Label>
Now, before this line, create more Label
control. Drag in another label; we'll call this labelOne
, as follows:
<asp:Label ID="labelOne" runat="server" ></asp:Label><br />
Now let's create one more Label
control. Take the labelOne
line and copy (Ctrl+C) and...