Link to home
Start Free TrialLog in
Avatar of directxBOB
directxBOBFlag for Ireland

asked on

Easiest way to compare two textboxes have the same text?

I have 2 textboxes:

Textbox1
Textbox2

The user must enter in values to both these texboxes but I need to ensure that the values entered into these textboxes match.

So what would be the simplest way to compare both these textboxes, without prompting a message box for every character entered.

I have tried doing it in the LostFocus Event and the TextChanged event. If there are any other recommendations I would love to hear them.

Cheers
Avatar of alb66
alb66
Flag of Italy image

If in the page there is a button like "OK" or "Submit" or "Next", I'd check the values on the click event for that button
Avatar of directxBOB

ASKER

I have those checks in place, but the customer wants a realtime check while the user is focused on the two texboxes. The end user of this system would not be consider computer literate at all, nor do they care much for computers. So trying to get them to find a textbox/field to enter into could be a challenge.
ASKER CERTIFIED SOLUTION
Avatar of CuteBug
CuteBug
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial