Solved

ASP.NET Compare Validator

Posted on 2012-03-22
7
323 Views
Last Modified: 2012-04-17
I have a web page that contains 3 textboxes

-  OldPwd
-  NewPwd
-  ConfirmPwd

I want to use the control validator to check that the OldPwd does not match the NewPwd.

Any ideas?
0
Comment
Question by:CipherIS
7 Comments
 
LVL 18

Expert Comment

by:Anil Golamari
Comment Utility
Can you try something like below:

<asp:CompareValidator ID="CompareValidator1"
     runat="server"
     ControlToCompare="NewPassword" // ID of your new password field
     ControlToValidate="CurrentPassword"  //ID of  current password field
     ErrorMessage="You should enter different password."
     ForeColor="Red">
</asp:CompareValidator>
0
 
LVL 29

Expert Comment

by:Paul Jackson
Comment Utility
Use the ASP.net compare validation control :

http://asp.net-tutorials.com/validation/compare-validator/
0
 
LVL 18

Expert Comment

by:Anil Golamari
Comment Utility
0
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 
LVL 7

Expert Comment

by:Lalit Chandra
Comment Utility
you should go to the link
http://www.eggheadcafe.com/community/asp-net/17/10174518/password-matching.aspx

Hope this will fix your problem.
0
 
LVL 5

Expert Comment

by:Vishal Kedar
Comment Utility
try below code

<asp:CompareValidator ID="CompareValidator1"
     runat="server"
     ControlToCompare="NewPassword" // ID of your new password field
     ControlToValidate="CurrentPassword"  //ID of  current password field
     ErrorMessage="You should enter different password."    
     Operator="NotEqual"                    
     type="String"
     ForeColor="Red">
</asp:CompareValidator>
0
 
LVL 1

Accepted Solution

by:
CipherIS earned 0 total points
Comment Utility
above does no work
0
 
LVL 1

Author Closing Comment

by:CipherIS
Comment Utility
Was not provided solution that worked.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now