Setting up the starting interface
Let's begin with Default.aspx
and drag a Button
control into the page. Change the Text
parameter on the button to say Show Summary
. Then, under the Button
tag , place a Label
control. Your screen should now look like the following screenshot:

Figure 5.8.1: The initial interface for this chapter
We've done this before, right? There's nothing new. The basic markup is shown in the following screenshot:

Figure 5.8.2: The basic markup for this chapter
Creating the GetValueAndInterest method
Let's go over to the Design
view and then double-click on the Button
control. This, of course, brings up the Event Handler. First, we'll create a method above it called GetValueAndInterest
. For this, enter the following:
private static void GetValueAndInterest(out decimal interest, ref decimal value)
You've seen private
, static
, and void
before. Here, GetValueAndInterest
is the name of our method. This is followed by out decimal
, then interest
, and then ref decimal value
. Follow...