Renu,
Thanks for your reply on my post.
My solution seemed to work but i still think it is not ideal.
Basically what I did is add another textbox with its display set to none so it can't be seen.
Ensure that it has a value.
I set mine to "This is needed to fire the custom validator script".
Set that textbox as the "ControlToValidate".
As you know the textbox has a value the "ClientValidationFunction" will always fire.
Then just use javascript to validate instead of args.value.
ie document.all.textbox1.value
so you might say
Code:
if((document.all.textbox1.value > 5) && (document.all.textbox2.value <7))
(
args.IsValid = true;
)
else
(
args.IsValid = false;
)
Basically the trick is to force the event to fire by pointing it to a textbox that will always have a value, then ignoring the args.value.
Id still be interested in finding a better way.
======================================
They say, best men are molded out of faults,
And, for the most, become much more the better
For being a little bad.
======================================