473,396 Members | 1,809 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

webcontrol in a radiobuttonlist

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
Nov 19 '05 #1
1 1034
That's because you can't do this. The item needs to be a string.

Kind regards,
Nikander & Margriet Bruggeman

"Fabio R." wrote:
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

Nov 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Hazzard | last post by:
I store radiobuttonlist values in the db using the string value of the radio button item value. (nvarchar) I am creating an edit functionality on the asp.net form so that when I reuse my...
5
by: DotNetGruven | last post by:
Anyone have any pointers on how to set the Value and Selected attributes in a ListItem in a RadioButtonList that is in a DataGrid? Here's what I have ------DataGrid------ -- BoundColumn 0 --...
6
by: DotNetGruven | last post by:
I have a webform that has a DataGrid on it with a RadioButtonList in each row. It is a simple On & Off. When the User Clicks on either of the RadioButtons, I need to postback to the server and...
5
by: Jon | last post by:
I would like to pass a reference of a webcontrol into a javascript function. Below I have a snippet of code. "me.selectedValue" returns undefined. I was hoping that would return the value that...
4
by: Emil | last post by:
Can somebody tell me what would be the syntax for having an if statement and setting the selected index of a radiobuttonlist? This is my first project using ASP.net and I use C#. I have a repeater...
4
by: juststarter | last post by:
Hello, I have an aspx file where i've put a placeholder element. On load (page_load) i create dynamically an html table which contains a checkbox and a radiobuttonlist in each tablerow . The...
5
by: Řyvind Isaksen | last post by:
I'm making a page to update articles. When a radiobuttonlist is displayed, I want the stored value to be displayed as default (checked). Example: I use a procedure to display the...
5
by: =?Utf-8?B?UGF1bA==?= | last post by:
Hallo, I have a radiobuttonlist control that is added on a custom Web User Control. This control has a property that exposes the SelectedIndex property of the embedded radiobuttonlist. When...
6
by: SAL | last post by:
hello, I'm using a radiobuttonlist in an updatepanel in an item template in a Gridview control. I'm populating the radiobuttonlist in the RowDataBound event. I have the control toolkit registered...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.