RequiredFieldValidator control

D

Dave

Hello.

I have the web form where user can input some data in textboxes, I'm
validating user input with RequiredFieldValidator controls, then I have two
buttons "OK" and "Cancel".
Now when I press "OK" the RequiredFieldValidator works fine, but when I
press "Cancel" I don't want to validate inputs.
So how can I temporarily disable RequiredFieldValidator, because I want
press "Cancel" and handle some actions at server side?

Thank You.
 
S

Shiva

See if setting Button.CausesValidation to false helps. Remember this skips
all the validations not just required-field-validations.

HTH

Hello.

I have the web form where user can input some data in textboxes, I'm
validating user input with RequiredFieldValidator controls, then I have two
buttons "OK" and "Cancel".
Now when I press "OK" the RequiredFieldValidator works fine, but when I
press "Cancel" I don't want to validate inputs.
So how can I temporarily disable RequiredFieldValidator, because I want
press "Cancel" and handle some actions at server side?

Thank You.
 

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,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top