Summarizing the values in a list
Let's start by making three boxes on the page. For this, enter the following in the form:
Value 1: <asp: TextBox ID="TextBox1" runat="server">< /asp:TextBox><br />
This is where you're going to put the first value. Close this with a <br>
tag, of course. Then, copy this and paste it beneath the preceding code line. Note that when you're pasting numbers, it automatically changes from TextBox1
to TextBox2
. A nice little feature, right? Change this line to start with Value 2
. Now paste it down below the preceding code line one more time and change this line to start with Value 3
.
Next, drag a Button
control below these lines so that somebody can click to summarize the values of the list. We'll define Summarize
here as, for example, finding the maximum, minimum, average, sum, and so on of the values in the list. We'll do this just to illustrate some of the functions that can be applied to lists very easily.
Now change the Text
property in the...