<%@ Page Title="Home Page" Language="VB" MasterPageFile="~/Site.Master" AutoEventWireup="false"
    CodeFile="Default.aspx.vb" Inherits="_Default" %>

<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
    <style type="text/css">
        .style1
        {
            width: 49%;
        }
        .style2
        {
        }
        .style4
        {
            width: 278px;
        }
        .style5
        {
            font-size: large;
            text-align: center;
        }
        .style6
      {
        width: 351px;
      }
    </style>
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
    <table align="left" bgcolor="#FFFFCC" class="style1" 
      style="color: #000000; margin-right: 86px;">
        <tr>
            <td class="style5" colspan="2">
                <strong style="text-align: center">&nbsp;Tip Calculator</strong></td>
        </tr>
        <tr>
            <td align="right" class="style4">
                Cost of meal:</td>
            <td class="style6">
                <asp:TextBox ID="txtCost" runat="server" Width="50px"></asp:TextBox>
            &nbsp;&nbsp;
            &nbsp;
                <asp:RequiredFieldValidator ID="CostRequiredFieldValidator" runat="server" 
                  ControlToValidate="txtCost" ErrorMessage="You must enter the cost!" 
                  Font-Bold="True" ForeColor="Red"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td align="right" class="style4">
                Percent tip (such as 15, 18.5, 20):</td>
            <td class="style6">
                <asp:TextBox ID="txtPercent" runat="server" Width="50px" TabIndex="1"></asp:TextBox>
            &nbsp;&nbsp;
            &nbsp;
                <asp:RangeValidator ID="RangeValidator1" runat="server" 
                  ControlToValidate="txtPercent" ErrorMessage="Not a valid percentage!" 
                  MaximumValue="100" MinimumValue="2" Type="Double" Font-Bold="True" 
                  ForeColor="Red"></asp:RangeValidator>
            </td>
        </tr>
        <tr>
            <td align="center" class="style2" colspan="2">
                <asp:Button ID="btnCalculate" runat="server" Text="Calculate Tip" 
                  TabIndex="2" />
            </td>
        </tr>
        <tr>
            <td align="right" class="style4">
                Amount of tip:</td>
            <td class="style6">
                <asp:TextBox ID="txtTip" runat="server" ReadOnly="True" Width="50px"></asp:TextBox>
            </td>
        </tr>
    </table>
</asp:Content>