I have a TextBox (UserNumber) that I need to validate. The validation routine will take the value entered into the TextBox and use it to query two different database tables. If it fails the validation from querying the first table I need to set the ErrorMessage field of the CustomValidator to a particular error message text and processing stops until the user corrects the problem. If it passes the validation from the first table I go on to run the query against the second table. If it fails the validation on the second table I need to set the ErrorMessage field of the CustomValidator to a different error message text and processing stops until the user corrects the problem. If it passes both query checks then validation is successful and processing continues.
How do I do this using ASP and VB code? How do I, in the codebehind subroutine, reference the ErrorMessage field of the CustomValidator in order to set the error message to the te ...
Go to the complete details ...