The next step is to add a web form to the application that
will allow the user to maintain the list of UserAccount records.
1.
Right click on the OrderSystem project in the Solution Explorer and
select AddàNew Item… from the pop-up
menu.
2.
Select the Web Form template and change the name to Users.aspx. Click
the Add button.
3.
The HTML view of the web form should appear in Visual Studio. Add the
following code between the div tags.
<table>
<tr>
<td>Select A User:</td>
<td><asp:DropDownList runat=server ID="ddlUsers" AutoPostBack="True">
</asp:DropDownList> </td>
</tr>
<tr>
<td>First Name:</td>
<td><asp:TextBox runat="server" ID="txtFirstName"></asp:TextBox></td>
</tr>
<tr>
<td>Last Name:</td>
<td><asp:TextBox runat="server" ID="txtLastName"></asp:TextBox></td>
</tr>
<tr>
<td>Inserted:</td>
<td><asp:Label runat="server" ID="lblInserted"></asp:Label> </td>
</tr>
<tr>
<td>Updated:</td>
<td><asp:Label runat="server" ID="lblUpdated"></asp:Label> </td>
</tr>
</table>
<asp:Button runat=server ID="btnSave" Text="Save" />
<asp:Button ID="btnDelete" runat="server" Text="Delete" />
This code uses a HTML table to format the controls on the
web form. If you switch to Design view the form should look like the following
image.
Figure 5