Crank up Visual Studio, and make a project. What we will do first is to put a simple button into the HTML page. For this, go to Toolbox
, grab a Button
control, and drop it below the line that begins with <form id=...
. Change the text on the button to say Show People
.
You will make a class called Person
, and you will make that class from the database. To do this, go to the View
menu and open SQL Server Object Explorer
. Remember that we made a database called People
, and it is comprised of these fields: Id
, NAME
, and DATEADDED
.
Now, let's add one more field. Right-click on the dbo.People
table icon, and select View Code
. To make an additional field, type the following after DATEADDED
:
SALARY decimal(18,2)
This is a new field type, decimal (18,2)
means a field that is 18 units wide and has 2 decimals; that is, it's a total of 18 units wide with 2 to the right and 16 units to the left for a total of 18 units altogether...