C#, ASP.NET 2.0, Textbox validation question
Posted on 2007-03-21
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.