RequiredFieldValidator Programmatically Added to Page

A

a

Hello,

I have a script that adds either a CheckBoxList or RadioButtonList based on
a flag. If I add the RadioButtonList to my Panel, I also want to add a
RequiredFieldValidator for that RadioButtonList. How would I do this? I
can't seem to get the 'right' ControlToValidate property for the RFV.

Thanks!
 
A

a

OK, I got it.

I set the ID property for the RadioButtonlist, then used that string for the
ControlToValidate.

You can't just use myRadioButtonList.ID or myRadioButtonList.ClientID


kevin
 

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
474,078
Messages
2,570,570
Members
47,204
Latest member
MalorieSte

Latest Threads

Top