Listato

<form runat="server">
    <asp:Label id="lblMessage" runat="server" forecolor="Red" />
    <asp:panel runat="server">
        <table border="0">
            <tr>
                <td valign="top" width="200">Nome:*</td>
                <td valign="top" width="300">
                    <asp:TextBox id="tbNome" runat="server" /><br>
                    <asp:RequiredFieldValidator runat="server"
                        ControlToValidate="tbNome"
                        ErrorMessage="Nome necessario" />
                </td>
            </tr>
            <tr>
                <td valign="top">Cognome:*</td>
                <td valign="top">
                    <asp:TextBox id="tbCognome" runat="server" /><br>
                    <asp:RequiredFieldValidator runat="server"
                        ControlToValidate="tbCognome"
                        ErrorMessage="Cognome necessario" />
                </td>
            </tr>
            <tr>
                <td valign="top">Password:*</td>
                <td valign="top">
                    <asp:TextBox id="tbPassword" runat="server"
                        TextMode="Password" /><br>
                    <asp:RequiredFieldValidator runat="server"
                        ControlToValidate="tbPassword"
                        ErrorMessage="Password necessaria" />
                </td>
            </tr>
            <tr>
                <td valign="top">Ripeti password:*</td>
                <td valign="top">
                    <asp:TextBox id="tbPassword2" runat="server"
                        TextMode="Password" /><br>
                    <asp:RequiredFieldValidator runat="server"
                        ControlToValidate="tbPassword2"
                        ErrorMessage="Password necessaria" /><br>
                    <asp:CompareValidator runat="server"
                        ControlToValidate="tbPassword"
                        ErrorMessage="Le password non corrispondono"
                        ControlToCompare="tbPassword2" />
                </td>
            </tr>
            <tr>
                <td valign="top">Email:*</td>
                <td valign="top">
                    <asp:TextBox id="tbEmail" runat="server" /><br>
                    <asp:RequiredFieldValidator runat="server"
                        ControlToValidate="tbEmail"
                        ErrorMessage="Email necessaria" /><br>
                    <asp:RegularExpressionValidator runat="server"
                        ControlToValidate="tbEmail"
                        ErrorMessage="L'email non Ë valida"
                        ValidationExpression="\w+\@\w+\.\w+" />
                </td>
            </tr>
            <tr>
                <td valign="top">Indirizzo:</td>
                <td valign="top">
                    <asp:TextBox id="tbIndirizzo" runat="server" />
                </td>
            </tr>
            <tr>
                <td valign="top">Cittę:</td>
                <td valign="top">
                    <asp:TextBox id="tbCitta" runat="server" />
                </td>
            </tr>
            <tr>
                <td valign="top">CAP:</td>
                <td valign="top">
                    <asp:TextBox id="tbCAP" runat="server" size="5" /><br>
                    <asp:RegularExpressionValidator runat="server"
                        ControlToValidate="tbCAP"
                        ErrorMessage="CAP non valido"
                        ValidationExpression="[0-9]{5}" />
                </td>
            </tr>
            <tr>
                <td valign="top">Etę:</td>
                <td valign="top">
                    <asp:TextBox id="tbEta" runat="server" size="5" /><br>
                    <asp:RangeValidator runat="server"
                        ControlToValidate="tbEta"
                        ErrorMessage="Etę non valida" Type="Integer"
                        MaximumValue="100" MinimumValue="5" />
                </td>
            </tr>
            <tr>
                <td valign="top" align="middle" colspan="2">
                    <asp:Button id="btSubmit" runat="server"
                        Text="OK" onclick="Submit" />
                </td>
            </tr>
        </table>
    </asp:panel>
</form>