Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can you suppress validation controls when not needed?

Status
Not open for further replies.

mb22

Programmer
Sep 4, 2002
258
US
I have a form with several validation controls ... Sometimes I do not need the validation controls depending on a certain combination of options ..... how can I suppress the validation in that case?

Do I just make the validation fields invisible or what?
 
mb: don't have the answer at the top of my head but in the last week this very question was asked - do a bit of research here - you should be able to find it quicly - I think Paul, link9, provided the answer.
 
One way is to set the Enabled property of the validator control to true or false during the page load event, based on conditions.
 
dragon: If I remember correctly that was very close to the solution provided.
 
Another way might be to do a check if the combination of options select does not warrant a validation, then set the CausesValidation property of your submit button to false.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top