validation ctrl blocks submit button click event

M

Martin Knott

Hopefully an easy answer.

I've got a form with 1 input field, and a submit button. I register an
event for the button, run in debug mode, push the button and sure enough
I'm in the event handler. But when I add a validator to the form and
connect it to the input field then I never can debug into the breakpoint
in the buttons' handler. The validation works as expected.

Why and how does the validator somehow inhibit the buttons' click event?

cheers,

Martin
 
M

Martin Knott

Oops.

Just found out. If a validator fails then the click event doesn't fire.
Which is nice in a way, but I get the nagging feeling that I might like
some buttons to work on an "invalid" page. Can I circumvent the validators?

double oops.

Yes I can by setting the CausesValidation property of the button to false.

I'm glad the answer was straighforward.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top