Home All Groups Group Topic Archive Search About

Can we have more than 1 'control to validate' for a single validat

Author
19 May 2005 7:17 AM
Pradeep be
I am trying to implement a feautre where it would be easy if i could perform
validations on 2 controls using a single validation control(can be a custome
validation control)
Can we have more than 1 'control to validate' for a single validation control.

Is this possible

Thanks Pradeep

Author
20 May 2005 6:10 PM
Steve C. Orr [MVP, MCSD]
No, each validation control can only validate one control.

Here's more info:
http://SteveOrr.net/Articles/Validation.aspx

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net




Show quoteHide quote
"Pradeep be" <Pradeep b*@discussions.microsoft.com> wrote in message
news:B32023CB-FCB1-4B2D-BC28-70DCEA8F2195@microsoft.com...
>I am trying to implement a feautre where it would be easy if i could
>perform
> validations on 2 controls using a single validation control(can be a
> custome
> validation control)
> Can we have more than 1 'control to validate' for a single validation
> control.
>
> Is this possible
>
> Thanks Pradeep
>
Author
30 May 2005 11:08 AM
Pradeep
Thanks Steve.
I was hoping that there would be  a way to do that easily.
It appears that i have to write a control to do this.
Not easy by the looks of it.
Regards,
Pradeep

Show quoteHide quote
"Steve C. Orr [MVP, MCSD]" wrote:

> No, each validation control can only validate one control.
>
> Here's more info:
> http://SteveOrr.net/Articles/Validation.aspx
>
> --
> I hope this helps,
> Steve C. Orr, MCSD, MVP
> http://SteveOrr.net
>
>
>
>
> "Pradeep be" <Pradeep b*@discussions.microsoft.com> wrote in message
> news:B32023CB-FCB1-4B2D-BC28-70DCEA8F2195@microsoft.com...
> >I am trying to implement a feautre where it would be easy if i could
> >perform
> > validations on 2 controls using a single validation control(can be a
> > custome
> > validation control)
> > Can we have more than 1 'control to validate' for a single validation
> > control.
> >
> > Is this possible
> >
> > Thanks Pradeep
> >
>
>
>
Author
21 May 2005 4:35 PM
Peter Blum
The ASP.NET validators cannot do that unless you use a CustomValidator to
built the logic yourself. You won't be able to assign the two controls to
the ControlToValidate property (since there is only one of these
properties). So you will have to hardcode the control reference into your
custom validator's evaluation function.

My Professional Validation And More (http://www.peterblum.com/vam/home.aspx)
is a replacement to the original validators designed to overcome its many
limitations and let you develop without all the custom code and hacks you
face now. It has 25 validators that support client-side validation on many
browsers. Its MultiConditionValidator is designed to let you merge the
evaluation logic of several validators into one boolean expression like
"RequiredField AND Compare to Value". You have one error message as a
result.
--
--- Peter Blum
www.PeterBlum.com
Email: PLB***@PeterBlum.com
Creator of "Professional Validation And More" at
http://www.peterblum.com/vam/home.aspx

Show quoteHide quote
"Pradeep be" <Pradeep b*@discussions.microsoft.com> wrote in message
news:B32023CB-FCB1-4B2D-BC28-70DCEA8F2195@microsoft.com...
>I am trying to implement a feautre where it would be easy if i could
>perform
> validations on 2 controls using a single validation control(can be a
> custome
> validation control)
> Can we have more than 1 'control to validate' for a single validation
> control.
>
> Is this possible
>
> Thanks Pradeep
>