L
Louis Yeung
Hi,
I am playing with validators using VS2003 on a XP box. I have textboxes with
regExp validators and a button. The validators work when I press the button.
If any validator fails, error messages are displayed and button click event
does not fire (i.e. not hitting my breakpoint). Everything works as stated.
Some error messages are in line and some are shown in a validationSummary
control.
I added a customValidator to a textbox which already has a regExp
validator. The custom validation code was fired. I set args.IsValid=false. I
was surprised the button click event was fired. Inside the event handler, I
examined the customValidator.IsValid and WebForm1.IsValid values which are
both false.
According to MSDN , the customValidator should behave like other validators.
Can someone explain why the button event is fired eventhough the
customValidator fails the validation.
...Louis
I am playing with validators using VS2003 on a XP box. I have textboxes with
regExp validators and a button. The validators work when I press the button.
If any validator fails, error messages are displayed and button click event
does not fire (i.e. not hitting my breakpoint). Everything works as stated.
Some error messages are in line and some are shown in a validationSummary
control.
I added a customValidator to a textbox which already has a regExp
validator. The custom validation code was fired. I set args.IsValid=false. I
was surprised the button click event was fired. Inside the event handler, I
examined the customValidator.IsValid and WebForm1.IsValid values which are
both false.
According to MSDN , the customValidator should behave like other validators.
Can someone explain why the button event is fired eventhough the
customValidator fails the validation.
...Louis