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 ??

<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>
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.