Anyone heard of validatorhookupcontrol?

A

Alan Silver

Hello,

I was reading an MSDN article on validation, and it mentioned the
validatorhookupcontrol client side API as enabling you to hook up more
than one control to a validator.

I just checked the SDK, and couldn't find such an API. I then searched
MSDN and MSDN2 and only found one reference to it, from the article I
had just read.

Anyone know anything about this? Was it in a beta and then dropped?

Is there any way to hook up two controls to one validator? I have been
looking for this for some time and thought I'd struck gold!!

TIA
 
P

Peter Blum

If you only want one additional control to hookup, the CompareValidator has
an infrastructure that we can take advantage of. It needs to handle the
ControlToCompare property.

So on your validator, do this:
Validator1.Attributes.Add("controlhookup", OtherTextBox.ClientID)
(Be sure to use lowercase on "controlhookup".)

--- Peter Blum
www.PeterBlum.com
Email: (e-mail address removed)
Creator of "Professional Validation And More" at
http://www.peterblum.com/vam/home.aspx
 
A

Alan Silver

Thanks Peter, that's exactly what I wanted.

Peter Blum said:
If you only want one additional control to hookup, the CompareValidator has
an infrastructure that we can take advantage of. It needs to handle the
ControlToCompare property.

So on your validator, do this:
Validator1.Attributes.Add("controlhookup", OtherTextBox.ClientID)
(Be sure to use lowercase on "controlhookup".)

--- Peter Blum
www.PeterBlum.com
Email: (e-mail address removed)
Creator of "Professional Validation And More" at
http://www.peterblum.com/vam/home.aspx
 

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

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,140
Latest member
SweetcalmCBDreview
Top