Basically I have a page with a drop down list and a calendar control, and a submit button. What I wanted to do was to validate that the drop down and calendar were selected before proceeding to the next page.
Can someone get me started w/some coding to do this or any general help (If possible in VB)
Thanks in advanced
Mike GoldPosted Aug 1, 2007, 6:29 PM
You can just add required a field validator for every control you want to validate. Depending upon what you want to do, you can add a RequiredFieldValidator for fields you don't want to be empty and RegularExpressionValidators for fields you expect a certain format. You simply set the ControlToValidate property of the validator to the control you want to validate and set the ErrorMessage to the error you want to display if something is invalid.
The Validator will prevent the page from accepting a submit.