Figure 4

Figure 4 Hello World in WML
<?xml version='1.0'?>
<!DOCTYPE wml PUBLIC '-//WAPFORUM//DTD WML 1.1//EN' 
    'http://www.wapforum.org/DTD/wml_1.1.xml'>
<wml>
<head>
<meta http-equiv="Cache-Control" content="max-age=0" />
</head>

<card>
<p>
Hello, world!
<br/>
</p>
</card>
</wml>
Figure 5 Hello World in HTML
<html>
<body>
<form id="ctrl1" name="ctrl1" method="post"
 action="HelloWorld.aspx?631178210012837088">

<INPUT type="hidden" name="__VIEWSTATE" 
 value="NDZmNmUwZDYtYWQ4OC00MzFkLTljNDYtNzNlMThkNjc5Zjc1LDA=e4cccf86">
<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
  theform.submit()
}
// —>
</script>
<div>
Hello, world!
</div></form></body></html>
Figure 9 Defining Input Labels
<Mobile:Label runat="server" id="lbCreditRequest"
 StyleReference="title">Credit Request
</Mobile:Label>
    <Mobile:Label runat="server">Enter Name:</Mobile:Label>
    <Mobile:RequiredFieldValidator runat=server ControlToValidate="Name" 
                                   ErrorMessage="The Name cannot be 
                                   empty.">
                                   Please fill in a Name
    </Mobile:RequiredFieldValidator>
    <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" 
                            OnServerValidate="SSN_ServerValidate" 
                            ErrorMessage="Invalid SSN.">
Please enter an valid SSN.
</Mobile:CustomValidator>
    <Mobile:RequiredFieldValidator runat=server ControlToValidate="SSN" 
                                   ErrorMessage="The SSN cannot be 
                                   empty."> Please fill in a SSN
</Mobile:RequiredFieldValidator>
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
                 Else
                If IsNumeric(strChar) = False then Exit Function
                 End if
            End if

            intIndex = intIndex + 1
        End While

    Else
        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:List>

<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" />
</Mobile:List>
Figure 12 frmCreditReportSubmit Form
<Mobile:Form id="frmCreditReportSubmit" runat="server" 
             OnActivate="frmCreditReportSubmit_OnActivate">
    <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</
        Mobile:Link>
</Mobile:Form>
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"
        frmCreditReportSubmit.DataBind
    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 
        Status</Mobile:Label>
    <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" />
</Mobile:Form>
Figure 16 frmCreditReportStatusSubmit Form
Sub frmCreditReportStatusSubmit_OnActivate(sender as Object, e as 
                                           EventArgs)
    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"
    Else
        lblCRStatus.Text = ""
    End If
End Sub