J
jdn
Would appreciate some help, as I am blanking on the best way to do this.
I want to have a Range Validator for a textbox where the Minimum and Maximum values are based on what is entered in a different textbox. So, for instance, if the value in the other textbox is X, then the range validator would check to ensure that the value being validated is between 20-50% of X.
What is the easiest way to do this, in such a way that there can be client-side validation as well? Options I've though of...
1) Create a new control that derives from BaseValidator
2) Create a new control that derives from RangeValidator itself
3) Skip making a new control and have the Maximum and Minimum values of a normal range validator changed in a function every time the text in the other textbox changes and/or loses focus.
3) is 'simpler' in some sense, but seems kind of 'hacky', but I've done neither 1) nor 2) before.
Unless there is some other way of doing it, that I'm not thinking of.
TIA
jdn
I want to have a Range Validator for a textbox where the Minimum and Maximum values are based on what is entered in a different textbox. So, for instance, if the value in the other textbox is X, then the range validator would check to ensure that the value being validated is between 20-50% of X.
What is the easiest way to do this, in such a way that there can be client-side validation as well? Options I've though of...
1) Create a new control that derives from BaseValidator
2) Create a new control that derives from RangeValidator itself
3) Skip making a new control and have the Maximum and Minimum values of a normal range validator changed in a function every time the text in the other textbox changes and/or loses focus.
3) is 'simpler' in some sense, but seems kind of 'hacky', but I've done neither 1) nor 2) before.
Unless there is some other way of doing it, that I'm not thinking of.
TIA
jdn