Dynamic Validation Control

C

Chris Kennedy

I am adding several controls dynamically in a composite control. Everytime I
add a control to the controls collection I increment an integer so I would
guess I know the where about the control is in the control collection.
I get the id of that control like this
validateid = Controls(ControlCounter).id
valrequired.ControltoValidate = validateid
Next I add a validate control. This causes my control to throw an error
The ControlToValidate property of '' cannot be blank.
I have also tried to uniqueid but I then get:
Unable to find control id 'CompControl1:_ctl2' referenced by the
'ControlToValidate' property of

Can anyone point me in the right direction, Chris.
 

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,754
Messages
2,569,528
Members
45,000
Latest member
MurrayKeync

Latest Threads

Top