0

Hey guys avtually i have a registration form ( a table of 3 columns, the name, textbox and the validations ). Everthing is working fine but i would like to do something which i am unable to do..

Actually in one row there is 2 validations (RequiredFieldVal and CompareVal), the problem i am seeing is that for intance if the checkbox is empty so the RequiredFieldVal exectues and display the message "Password is missing" . Bit now if the password is entered but only 3 in length rhe compareVal eexcutes and disply the message but IT IS DISPLAYED AFTER THE RequiredFieldVal ( despite that one being invisible)..

How i can i make it appear the first message ??

1
Contributor
1
Reply
2
Views
5 Years
Discussion Span
Last Post by Master Mascus
0
<tr>
                                      <td class="style2">
                                          Password :</td>
                                      <td>
                                         <asp:TextBox ID="txtpassword" runat="server" TextMode="Password" CssClass="textbox"/> 
                                      </td>
                                      <td>
                                         <asp:RequiredFieldValidator id="reqPassword" ControlToValidate="txtpassword" 
                                            ErrorMessage="* Password is missing " ValidationGroup="GrpPassword" runat="server" style="color: #FF0000"  SetFocusOnError="true"/>

                                            <asp:CustomValidator
                                                id="ValPassword"
                                                ControlToValidate="txtpassword"
                                                ErrorMessage="* Password must be 5-10 characters"
                                                OnServerValidate="ValPassword_ServerValidate"
                                                Runat="server" 
                                                ClientValidationFunction="valPassword_ClientValidate"  
                                               style="color: #FF0000"  SetFocusOnError="true"
                                            /> 
                                      </td>
                                  </tr>
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.