webcontrol in a radiobuttonlist

F

Fabio R.

How can I insert a webcontrol in a radiobuttonlist listitem? If I use:

<asp:RadioButtonList id="rbl" runat="server" RepeatLayout="Flow">
<asp:ListItem Value="1" Selected="True">text1</asp:ListItem>
<asp:ListItem Value="2">text2</asp:ListItem>
<asp:ListItem Value="3"><asp:button id="btn" runat="server"
text="Click"></asp:button></asp:ListItem>
</asp:RadioButtonList>

I get an "Error Creating Control" error in design-time for the
radiobuttonlist: 'Items' could not be initialized...
The asp:button it's only for the example, I need to use a custom control
there.
Thanks in advance,
Fabio
 
G

Guest

That's because you can't do this. The item needs to be a string.

Kind regards,
Nikander & Margriet Bruggeman
 

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,755
Messages
2,569,537
Members
45,023
Latest member
websitedesig25

Latest Threads

Top