Setting up the user interface
Let's begin with Default.aspx
. Open Toolbox
(remember, Ctrl+Alt+X) and then insert a Label
control simply as a place to hold some output. Let's also place a TextBox
control above the Label
control. Grab a TextBox
control, and drag and drop it into the page. Now, the last thing to do to set this up is to put a <br>
tag at the end of the TextBox
line. Our simple user interface is shown in the following screenshot:

Figure 5.3.1: Our simple user interface
Creating a method
Now switch to the Design
view, and double-click on TextBox. This generates the event handler, and here you'll create your code. But first, right above it, we will create a method, as shown as follows. A method is simply a chunk of code. Usually, it has a very definite purpose that is expressed very clearly through the name of the method:
private static double GetIncreasedValue(double x)
Let's begin with some of the requirements. First, we start with private
, and the fact that this is private...