<%@ Page Language="C#" Inherits="HawhawPage" %>
<%@ Register Assembly="Hawhaw" Namespace="Hawhaw" TagPrefix="Haw" %>

<!--
        HAWHAW example for (quite a stupid) password authentication
        Norbert Huffschmid
        15.3.2009
-->

<script runat="server">

    protected void OnSubmit(object sender, EventArgs e)
    {
        inputForm.Visible = false;
        
        welcome.Text ="Hello " + account.Text;
        info.Text ="Your password expires in 3 days!";
    }
    
</script>

<Haw:Deck runat="server" Title="Authenticate" Simulator="Skin" HorizontalAlign="Center">

    <Haw:Form runat="server" ID="inputForm">
        <Haw:Label runat="server" Text="Please enter some digits:"></Haw:Label>
        <Haw:TextBox runat="server" ID="account" Label="Account" Width="4" MaxLength="4" WapFormat="*N" />   
        <Haw:TextBox runat="server" ID="passwd" Label="Password" Width="4" MaxLength="4" Password="True" />   
        <Haw:Button runat="server" Text="Submit" OnClick="OnSubmit" />
    </Haw:Form>

    <!-- These labels are filled programmatically after postback -->
    <Haw:Label runat="server" Text="" ID="welcome" Big="True" />
    <Haw:Label runat="server" Text="" ID="info" Small="True" />

</Haw:Deck>