Figure 4

Figure 4 Hello World in WML
<?xml version='1.0'?>
<meta http-equiv="Cache-Control" content="max-age=0" />

Hello, world!
Figure 5 Hello World in HTML
<form id="ctrl1" name="ctrl1" method="post"

<INPUT type="hidden" name="__VIEWSTATE" 
<input type="hidden" name="__EVENTTARGET" value="">
<input type="hidden" name="__EVENTARGUMENT" value="">
<script language=javascript><!—
function __doPostBack(target, argument){
  var theform = document.ctrl1
  theform.__EVENTTARGET.value = target
  theform.__EVENTARGUMENT.value = argument
// —>
Hello, world!
Figure 9 Defining Input Labels
<Mobile:Label runat="server" id="lbCreditRequest"
 StyleReference="title">Credit Request
    <Mobile:Label runat="server">Enter Name:</Mobile:Label>
    <Mobile:RequiredFieldValidator runat=server ControlToValidate="Name" 
                                   ErrorMessage="The Name cannot be 
                                   Please fill in a Name
    <Mobile:TextBox runat="server" id="Name" />
    <Mobile:Label runat="server">Enter SSN:</Mobile:Label>
    <Mobile:TextBox runat="server" id="SSN" />
    <Mobile:CustomValidator runat=server ControlToValidate="SSN" 
                            ErrorMessage="Invalid SSN.">
Please enter an valid SSN.
    <Mobile:RequiredFieldValidator runat=server ControlToValidate="SSN" 
                                   ErrorMessage="The SSN cannot be 
                                   empty."> Please fill in a SSN
Figure 10 Data Validation
Function SSN_ServerValidate(source As Object, _
                            value As String) as Boolean

    SSN_ServerValidate = False 
    Dim intIndex as Integer = 1
    Dim intLen as Integer
    Dim strChar as String

    intLen = Len(Trim(value))

    If intLen = 9 or intLen = 11 Then 'With or without dashes
        While intIndex < intLen
            strChar = Mid(value,intIndex,1)
            if intLen = 9 then
                 If IsNumeric(strChar) = False then Exit Function
            ElseIf intLen = 11 then
                 If intIndex = 4 or intIndex = 7 then
                If strChar <> "-" then Exit Function
                If IsNumeric(strChar) = False then Exit Function
                 End if
            End if

            intIndex = intIndex + 1
        End While

        Exit Function
    End if
    SSN_ServerValidate = True

End Function
Figure 11 List Items
<Mobile:List runat="server" id="lstReportType" SelectionMode="true">
    <Item Text="InFile" Value="InFile" />
    <Item Text="RMCR" Value="RMCR" />

<Mobile:Label runat="server">Select Order Type:</Mobile:Label>
<Mobile:List runat="server" id="lstOrderType" SelectionMode="true">
    <Item Text="New" Value="New" />
    <Item Text="Cancel" Value="Cancel" />
<Item Text="Convert" Value="Convert" />
<Item Text="Reissue" Value="Reissue" />
<Item Text="Status" Value="Status" />
Figure 12 frmCreditReportSubmit Form
<Mobile:Form id="frmCreditReportSubmit" runat="server" 
    <Mobile:ValidationSummary FormToValidate="frmCreditRequest" 
        HeaderText="Submition Error:" runat=server/>
    <Mobile:Label runat="server" StyleReference="title" Text="Your 
        Submission:" />
    <Mobile:Label runat="server">Name: <%# Name.Text %></Mobile:Label>
    <Mobile:Label runat="server">SSN: <%# SSN.Text %></Mobile:Label>
    <Mobile:Label runat="server">Report Type: <%# 
        lstReportType.Selection.Value %></Mobile:Label>
    <Mobile:Label runat="server">Order Type: <%# 
        lstOrderType.Selection.Value %></Mobile:Label>
    <Mobile:Label runat="server" StyleReference="title" 
        id="lblSubmission" Text="" />
    <Mobile:Link runat="server" Target="default.aspx">Main Menu</
Figure 13 frmCreditReportSubmit_OnActivate Form
Sub frmCreditReportSubmit_OnActivate(sender as Object, e as EventArgs)

    Dim bolSubmitted as Boolean 

    'Submit the request to an asychronous (MSMQ?) 
    'process and respond back to the 
    'Loan officer if it was successfully submitted
    'Let's assume it was successfully dropped.
    bolSubmitted = True
    if bolSubmitted = true and Page.IsValid = True then 
        lblSubmission.Text = "was successful"
    Elseif bolSubmitted = False or Page.IsValid = False then
        lblSubmission.Text = "was unsuccessful"
    End If
Figure 15 frmCreditReportStatus Form
<Mobile:Form id="frmCreditReportStatus" runat="server">
    <Mobile:Label runat="server" StyleReference="title">Credit Report 
    <Mobile:TextBox runat="server" id="Status_SSN" />
    <Mobile:CustomValidator runat=server ControlToValidate="Status_SSN" 
        OnServerValidate="SSN_ServerValidate" ErrorMessage="Invalid 
        SSN.">Please enter an valid SSN.</Mobile:CustomValidator>
    <Mobile:RequiredFieldValidator runat=server 
        ControlToValidate="Status_SSN" ErrorMessage="The SSN cannot be 
        empty.">Please fill in a SSN</Mobile:RequiredFieldValidator>
    <Mobile:Command runat="server" 
        OnClick="cmdSubmitCreditReportStatus_OnClick" Text="Submit" />
Figure 16 frmCreditReportStatusSubmit Form
Sub frmCreditReportStatusSubmit_OnActivate(sender as Object, e as 
    Dim bolRecieved as Boolean 

    'Invoke a process to determine if the Credit Report has returned
    'We'll assume it came back.
    bolRecieved  = True
    if bolRecieved = true and Page.IsValid = True then 
        lblCRStatus.Text = "Status:Recieved"
    Elseif bolRecieved = False or Page.IsValid = True then
        lblCRStatus.Text = "Status:Not Recieved"
        lblCRStatus.Text = ""
    End If
End Sub