Link to home
Start Free TrialLog in
Avatar of CantonMarko
CantonMarkoFlag for United States of America

asked on

C#, ASP.NET 2.0, Textbox validation question

I have a web form that has two textboxes on it.  I want to be able to validate that at least one of these boxes is blank before sending the request back to the server.  

If txtbxA.Text = "Something" then txtbxB.Text = ""  or
If txtbxB.Text = "Something" then txtbxA.Text = "" 

I have found ways to validate them to be equal to each other or to be equal to a specific value, but cannot figure out how to validate that one is always blank.

This is probably really easy, and I apologize if it is a stupid question, but I haven't worked much with web forms.  Any help is extremely appreciated.

Thanks
ASKER CERTIFIED SOLUTION
Avatar of KarinLoos
KarinLoos

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
Avatar of CantonMarko

ASKER

I cannot believe that I was so dumb!!!!  That was just too obvious.  Thank you very much for the suggestion.  It works just fine.