Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8511895
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T04:08:00+00:00 2026-06-11T04:08:00+00:00

Hi I have a change password page. I have 2 textboxes , New Password

  • 0

Hi I have a change password page.

I have 2 textboxes, New Password and Confirm Password.

Both have a requiredFieldValidators.

And a compareValidator.

But what happens is when I key in the first field New Password, the second textbox’s requiredFieldValidator and CompareValidator are showing error messages at the same time.

I only want to show requiredFieldValidator and only when that validator returns true, I want to validate compareValidator.

How can I achieve that. The following is my code.

        <table class="editAccTable">
            <tr>
                <td>
                    New Password<br />                      
                    <asp:TextBox ID="txtNewPwd" runat="server" TextMode="Password" Width="204px"></asp:TextBox>
                    <br />
                    <asp:RequiredFieldValidator ID="rfvNewPwd" runat="server"
                    ControlToValidate="txtNewPwd"
                    ValidationGroup="vgChangePwd"
                    Display="Dynamic"
                    ></asp:RequiredFieldValidator>
                </td>
                <td>
                    Confirm New Password<br />                      
                    <asp:TextBox ID="txtConfPwd" runat="server" TextMode="Password" Width="204px"></asp:TextBox>
                    <br />
                    <asp:RequiredFieldValidator ID="rfvConfPwd" runat="server"
                    ControlToValidate="txtConfPwd"
                    ValidationGroup="vgChangePwd"
                    Display="Dynamic"
                    ></asp:RequiredFieldValidator>
                    <asp:CompareValidator ID="cvChangePwd" runat="server"
                    ValidationGroup="vgChangePwd"
                    ControlToValidate="txtNewPwd"
                    ControlToCompare="txtConfPwd"
                    ValueToCompare="String"  
                    Display="Dynamic"                      
                    ></asp:CompareValidator>
                </td>
            </tr>
            <tr>
                <td colspan="2">
                    <asp:ImageButton ID="ibtnPwdChange" runat="server" 
                    ImageUrl="/images/submit.jpg" onclick="ibtnPwdChange_Click" 
                    ValidationGroup="vgChangePwd" 
                    Width="90px" Height="36px"
                    />
                    <br />      
                    <asp:Label ID="lblSuccessPwdChange" runat="server"></asp:Label>             
                </td>
            </tr>
        </table>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T04:08:01+00:00Added an answer on June 11, 2026 at 4:08 am

    There is a couple of work around.

    For my case, I can remove the requiredFieldValidator for the second textbox as it is enough to have only compareValidator.

    But there will be some cases, that there must have 2 validators. In that case, we can use css to overlap the 2 validators.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Change Password page that has a H2 HTML tag that says
I have a ASP.NET page which allows an administrator to change the password for
I have link change password in my home page..NOw i am telling you what
I have a password change page in my website to which I want to
I have a profile settings page where users can change their password and they
I have a change password page that needs to hash any passwords entered on
I have a change password page and on this page I have a regular
i would like to have a page where i can change passwords. me should
I have a change password script in PHP and I want to do is
I'm trying to put together a change password feature in Symfony2. I have a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.