ASP.NET Markup for the Peter's Data Entry Suite Order page. The DES controls are highlighted. Point to any of them to learn more about it. The fancy tooltips are the Enhanced ToolTip feature of DES.

This page has no server side code or JavaScript to assist the controls. You set properties on its controls and DES installs all of the code for you.

<des:PageManager ID="PageManager2" runat="server" 
    ShowAlertOnSubmit="True" ChangeStyleOnControlsWithError="True" />
<table cellpadding="4" style="width:100%;">
<tr class="TableTitles">
   <td colspan="2" style="font-weight:bold;font-size:14px;">
      Select the type of license
   </td>
</tr>
<tr class="TableRows">
   <td style="width:200px;">
      <asp:RadioButton ID="WebServerRB" runat="server" Text="Web Server" GroupName="LicenseType" Checked="true" />
   </td>
   <td>
      <p style="margin-top:3px;">Covers one production (live site) web server.</p>
      <p>As you add servers to your web farm, buy more. Once you reach five Web Server 
      Licenses, you are automatically upgraded to a Site License!</p>
      <i>You will need separate licenses for any failover servers.</i>
   </td>
</tr>
<tr class="TableRows">
   <td>
      <asp:RadioButton ID="SiteRB" runat="server" Text="Site" GroupName="LicenseType" />
   </td>
   <td>
      Covers unlimited production (live site) web servers. Choose this when you have 5 or more production servers.
   </td>
</tr>
<tr class="TableRows">
   <td>
      <asp:RadioButton ID="RedistRB" runat="server" Text="Redistribution" GroupName="LicenseType" />
   </td>
   <td>
      <p style="margin-top:3px;">If you are licensing your web application to your customers
      and it will be deployed on their servers, choose this license.</p>
      This license also covers all of your own production servers like a Site license.
   </td>
</tr>
<tr class="TableRows">
   <td colspan="2" align="center" style="padding: 15px;">
      <asp:HyperLink ID="HyperLink1" Target="_blank" CssClass="ClickForMore" runat="server"
         NavigateUrl="License Agreement.html"> Read the License Agreement </asp:HyperLink>
   </td>
</tr>
</table>
<table id="SelectQty" runat="server" cellpadding="4" style="width:100%;">
<tr class="TableTitles">
   <td colspan="2" style="font-weight:bold;font-size:14px;">
      Select the number of Web Server licenses needed
   </td>
</tr>
<tr class="TableRows">
   <td style="width:200px;">
      Quantity:
      <des:IntegerTextBox ID="Quantity" runat="server" Text="1"
         MinValue="1" MaxValue="4" ShowSpinner="true" Columns="2" />

      <des:DataTypeCheckValidator ID="DataTypeCheckValidator1" runat="server"
         ControlIDToEvaluate="Quantity" ErrorMessage="Illegal value">
         <ErrorFormatterContainer>
            <des:PopupErrorFormatter Display="Dynamic" />
         </ErrorFormatterContainer>
      </des:DataTypeCheckValidator>
      <des:RangeValidator ID="RangeValidator1" runat="server" ControlIDToEvaluate="Quantity" 
         ErrorMessage="If you need more than 4 licenses, please select a Site license.">
         <ErrorFormatterContainer>
            <des:PopupErrorFormatter Display="Dynamic" />
         </ErrorFormatterContainer>
      </des:RangeValidator>
   </td>
   <td>
   One license is needed for each production server, including failover servers. If you need 5 or more, select a Site License instead.<br />
   If you are adding servers and already have some licenses, you only need a total of 5 licenses to be converted to a Site License.
   </td>
</tr>
</table>
<des:FieldStateController ID="FieldStateController1" runat="server" ControlIDToChange="SelectQty"
      ConditionFalse-Visible="false" InvisiblePreservesSpace="false">
   <ConditionContainer>
      <des:CheckStateCondition ControlIDToEvaluate="WebServerRB" />
   </ConditionContainer>
   <ExtraControlsToRunThisAction>
      <des:FSAControlConnection ControlID="SiteRB" />
      <des:FSAControlConnection ControlID="RedistRB" />
   </ExtraControlsToRunThisAction>
</des:FieldStateController>
<table id="ProductTable" runat="server" cellpadding="4" style="width:100%;">
<tr class="TableTitles">
   <td colspan="2" style="font-weight:bold;font-size:14px;">
      Select either the Suite or individual modules
   </td>
</tr>
<tr class="TableRows">
   <td style="width:200px;vertical-align:top;">
      <asp:RadioButton ID="SuiteRB" runat="server" Text="Peter's Data Entry Suite" GroupName="Suite" Checked="true" />
   </td>
   <td style="vertical-align:top;">
      <asp:Label ID="SuitePrice" runat="server" ></asp:Label> USD
      <des:CalculationController ID="SuitePricesCalc" runat="server" ShowValueControlID="SuitePrice"
            LabelFormatCurrencySymbol="true" LabelFormatThousandsSep="true" DecimalPlaces="Currency" AutoShowValue="Always">
         <Expression>
            <des:CheckStateCalcItem CheckStateControlID="WebServerRB" ValueWhenChecked="300.00" />
            <des:CheckStateCalcItem CheckStateControlID="SiteRB" ValueWhenChecked="1500.00" />
            <des:CheckStateCalcItem CheckStateControlID="RedistRB" ValueWhenChecked="2500.00" />
         </Expression>
      </des:CalculationController>
   </td>
</tr>
   
<tr class="TableRows">
   <td style="width:200px;vertical-align:top;">
      <asp:RadioButton ID="ModulesRB" runat="server" Text="Modules (select below)" GroupName="Suite" /> 
   </td>
   <td style="vertical-align:top;">
      <asp:Label ID="ModulePrice" runat="server" ></asp:Label> USD per module 
      <des:CountSelectionsValidator ID="CountSelectionsValidator1" runat="server" 
         ControlIDToEvaluate="ModulesCBL" Maximum="3" EventsThatValidate="OnChange" 
         ErrorMessage="With 4 or more modules, it is more cost effective to purchase the Suite." >
         <ErrorFormatterContainer>
            <des:TextErrorFormatter Display="Dynamic"></des:TextErrorFormatter>
         </ErrorFormatterContainer>
      </des:CountSelectionsValidator>

      <des:CalculationController ID="CalculationController3" runat="server" ShowValueControlID="ModulePrice"
            LabelFormatCurrencySymbol="true" LabelFormatThousandsSep="true" DecimalPlaces="Currency" AutoShowValue="Always">
         <Expression>
            <des:CheckStateCalcItem CheckStateControlID="WebServerRB" ValueWhenChecked="90.00" />
            <des:CheckStateCalcItem CheckStateControlID="SiteRB" ValueWhenChecked="450.00" />
            <des:CheckStateCalcItem CheckStateControlID="RedistRB" ValueWhenChecked="800.00" />
         </Expression>
      </des:CalculationController>
   </td>
</tr>
<tr class="TableRows">
<td colspan="2">
   <asp:CheckBoxList ID="ModulesCBL" runat="server" style="padding-left:30px;" >
      <asp:ListItem Value="0">Peter's Professional Validation</asp:ListItem>
      <asp:ListItem Value="1">Peter's More Validators</asp:ListItem>
      <asp:ListItem Value="2">Peter's TextBoxes</asp:ListItem>
      <asp:ListItem Value="3">Peter's Date and Time</asp:ListItem>
      <asp:ListItem Value="4">Peter's Interactive Pages</asp:ListItem>
      <asp:ListItem Value="5">Peter's Input Security</asp:ListItem>
   </asp:CheckBoxList>
   <des:RequiredListValidator ID="RequiredListValidator1" runat="server" ControlIDToEvaluate="ModulesCBL"
         ErrorMessage="Please select at least one module" ReportErrorsAfter="AllEditsWhenError">
      <EnablerContainer>
         <des:CheckStateCondition ControlIDToEvaluate="ModulesRB" EvaluateOnClickOrChange="false" />
      </EnablerContainer>
   </des:RequiredListValidator>
</td>
</tr>
</table>
<des:FieldStateController ID="FieldStateController2" runat="server" ControlIDToChange="ModulesCBL"
      ConditionFalse-Enabled="false">
   <ConditionContainer>
      <des:CheckStateCondition ControlIDToEvaluate="ModulesRB" />
   </ConditionContainer>
   <ExtraControlsToRunThisAction>
      <des:FSAControlConnection ControlID="SuiteRB" />
   </ExtraControlsToRunThisAction>
</des:FieldStateController>
<div style="width:99%;padding: 4px; margin-right:10px; background-color: #ffffcc; border:solid 1px brown;vertical-align:middle;">
   <img src="../Images/SWREG_secure.gif" style="float:right;" alt="SWReg Logo" />
   <div style="font-size:smaller;font-weight:normal;padding-left:5px;padding-right:5px;width:300px;float:right;">
      PeterBlum.com uses
      <asp:hyperlink id="Hyperlink2" runat="server" 
         NavigateUrl="http://www.swreg.org/overview_company.htm" Target="_blank">SWREG, Inc</asp:hyperlink>
      to take your order. They can take your order by credit card and PayPal. 
      (Sorry, no Purchase Order option is available.)
   </div>
   <div style="margin-top:10px;width:550px;">
      <span style="font-size:larger;font-weight:bold;">
         Subtotal: <asp:Label ID="Price" runat="server">$300.00</asp:Label> USD</span>
          (not including tax)<br /><br />
      <des:LinkButton ID="SubmitButton" runat="server" CssClass="ClickForMore" 
         style="font-size:14pt; margin-left:200px;" Text="&nbsp;Purchase&nbsp;Now&nbsp;" 
         onclick="SubmitTheOrder_Click" SkipPostBackEventsWhenInvalid="True" />
   </div>
   <br />
</div>
<br />
<des:CalculationController ID="CalculationController4" runat="server" 
   LabelFormatCurrencySymbol="True" LabelFormatThousandsSep="True" 
   ShowValueControlID="Price" DecimalPlaces="Currency" AutoShowValue="Always">
   <Expression>
      <des:ParenthesisCalcItem>
         <Expression>
            <des:CheckStateCalcItem CheckStateControlID="WebServerRB" ValueWhenChecked="1" />
            <des:CheckStateCalcItem CheckStateControlID="SiteRB" ValueWhenChecked="5" />
               
            <des:ConditionCalcItem >
               <ConditionContainer>
                  <des:CheckStateCondition ControlIDToEvaluate="SuiteRB"  />
               </ConditionContainer>
               <ExpressionWhenTrue>
                  <des:CheckStateCalcItem CheckStateControlID="RedistRB" 
                     ValueWhenChecked="8.3333333333333339" />
               </ExpressionWhenTrue>
               <ExpressionWhenFalse>
                  <des:CheckStateCalcItem CheckStateControlID="RedistRB" 
                     ValueWhenChecked="8.8888888888888888" />
               </ExpressionWhenFalse>
            </des:ConditionCalcItem>
         </Expression>
      </des:ParenthesisCalcItem>

      <des:ConditionCalcItem Condition="CheckStateCondition: SuiteRB is checked" 
         Operator="Multiply">
         <ConditionContainer>
            <des:CheckStateCondition ControlIDToEvaluate="SuiteRB" 
               Name="CheckStateCondition" />
         </ConditionContainer>
         <ExpressionWhenTrue>
            <des:ConstantCalcItem Constant="300" />
         </ExpressionWhenTrue>
         <ExpressionWhenFalse>
            <des:CheckStateCalcItem CheckStateControlID="ModulesCBL" 
               ValueWhenChecked="90" />
            <des:CheckStateCalcItem CheckStateControlID="ModulesCBL" Index="1"
               ValueWhenChecked="90" />
            <des:CheckStateCalcItem CheckStateControlID="ModulesCBL" Index="2"
               ValueWhenChecked="90" />
            <des:CheckStateCalcItem CheckStateControlID="ModulesCBL" Index="3"
               ValueWhenChecked="90" />
            <des:CheckStateCalcItem CheckStateControlID="ModulesCBL" Index="4"
               ValueWhenChecked="90" />
            <des:CheckStateCalcItem CheckStateControlID="ModulesCBL" Index="5"
               ValueWhenChecked="90" />
         </ExpressionWhenFalse>
      </des:ConditionCalcItem>

      <des:ConditionCalcItem Condition="CheckStateCondition: WebServerRB is checked" 
         Operator="Multiply">
         <ConditionContainer>
            <des:CheckStateCondition ControlIDToEvaluate="WebServerRB" 
               Name="CheckStateCondition" />
         </ConditionContainer>
         <ExpressionWhenTrue>
            <des:NumericTextBoxCalcItem TextBoxControlID="Quantity" />
         </ExpressionWhenTrue>
         <ExpressionWhenFalse>
            <des:ConstantCalcItem Constant="1" />
         </ExpressionWhenFalse>
      </des:ConditionCalcItem>
   </Expression>
</des:CalculationController>