validating groups of validators in 1.1

  • Thread starter Thread starter Darrel
  • Start date Start date
D

Darrel

I noticed this nice new feature in 2.0:

a.. Validation Groups - Validation groups allow multiple forms on a page to
be separately validated.

Alas, I'm using 1.1 on a project at the moment and need to do exactly that.

Any best-method way to handle that with 1.1?

I have one ASP.net form on the page, but two seperate sets of fields I want
to validate depending on which button I click.

Is it just a matter of this?:

button click handler()
validator1.validate()
validator2.validate()
...
validator9.validate()

if validator1.isvalid AND validator2.isvalid AND... validator9.isvalid()
do your thing
end if


-Darrel
 
As a followup, I tried just that (only validating the specific controls).

However, it still seems as if my reuired field validators are validating
even when I am not explicitely telling them to. Do those behave different
than the rest for some reason?

-Darrel
 
Darrel i don't think you can do what you want with ASP.NEt1.1
if i understand you i think your problem is that your validations are
clashing?
Try setting causesvalidation to false so they won't clash.
Patrick
 
Try setting causesvalidation to false so they won't clash.

aha! Excellent. Thanks!

-Darrel
 
Back
Top