Author: Kriswd40 | Posted on: 6/17/2009 11:07:49 AM | Views : 346

I have a page that will have two dynamically generated textboxes for FromDate and ToDate. I will know the ID's of these after they are created. Then I need to create a validator control that can access both of these textboxes...
 I need to be able to make sure that if someone enters a ToDate, they have also entered a FromDate. If they enter just a FromDate, that is fine.
My first thought was to use a CustomValidator control, but I don't see how I would use this with two different textboxes.
The only validator control that seems to use multiple controls is the CompareValidator, but it does not allow me to compare on the condition that one field has a value and another does not (only stuff like equal, less than, etc).
 Any thoughts as to how I should accomplish this? It needs to be done in the code behind because of how the date textboxes are generated.
...

Go to the complete details ...