views:

72

answers:

1

i have a RegularExpressionValidator to validate an Email input that i have, it works perfectly, if the input matches the Regular-expression,
However,if i enter a mistaken email it would show an error msg, if i fix the email in the input , it doesnt recheck it, the error msg stays not allowing me to click the Registeration button-or more like it gets clicked, but no event gets fired-

EDIT: added the ASPX code

< table width="100%">< tr><td>Username:</td>
<td>
<input  runat="server" id="txtUsername" type="text" size="30" />
</td> 
<td>
<asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server"
ControlToValidate="txtUsername" ErrorMessage="*"></asp:RequiredFieldValidator

 <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" 
 ErrorMessage="Username has to be atleast between 4-8 " 
 ValidationExpression="[A-Z]{4-8}" 
 ControlToValidate="txtUsername"></asp:RegularExpressionValidator>
 </td>           
    </tr>

    <tr>
        <td> Email:</td><td>    
        <input runat="server" id="txtemail"  type="text" size="30" /></td>
        <td>
        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
            ControlToValidate="txtemail" ErrorMessage="*">
       </asp:RequiredFieldValidator>
        <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" 
            ControlToValidate="txtemail" ErrorMessage="Format must be: [email protected]" 
            ValidationExpression="^[A-Za-z0-9._%+-]+@([A-Za-z0-9-]+\.)+([A-Za-z0-9]{2,4}|museum)$">
         </asp:RegularExpressionValidator>
        </td>
    </tr>
    <tr>
        <td>
    <asp:Label runat="server" ForeColor="red" ID="lblerror"></asp:Label>
</td>
</tr>
    <tr>
        <td> 
               </td>
                <td>
                <asp:Button runat="server" Text="Register" 
                ID="btnSubmit" Width="118px" onclick="btnSubmit_Click" />
                </td>
    </tr>
</table>
A: 

please can you post all of the page source

peacmaker