473,386 Members | 1,745 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,386 software developers and data experts.

RadioButton GroupName does not work !

Hi,
Got a repeater which display question answers and which contains a
placeholder.
In the ItemDataBound Event, I insert a Radio Button for each answer and set
their GroupName with the Question Id.
Anyway, when I display my aspx page, I can check ALL radio buttons at same
time !

What am I doing wrong?

*****
PlaceHolder plh = (PlaceHolder)CurrentItem.Controls[1];
System.Web.UI.WebControls.RadioButton NewRadio = new RadioButton();

NewRadio.ID="ClientCompanyTestQcmQuestionRadioProp ositon";

NewRadio.GroupName=CurrentP.Question_PropositionPa rent.Id;

NewRadio.Checked= false;

plh.Controls.Add(NewRadio);

*****

Thanks for help ^^



Nov 19 '05 #1
2 9643
This is a known bug in asp.net. This problem occurs because the Repeater
server control implements the INamingContainer interface, which requires
that all controls that are nested within it must have a unique name when
rendered in Hypertext Markup Language (HTML). Therefore, the HTML name
attribute of any rendered child server control is unique. For more details,
refer this link
http://support.microsoft.com/default...;EN-US;Q316495

Instead of asp.net radion button control, you can use this control
http://www.metabuilders.com/Tools/Ro...torColumn.aspx

--
Saravana
http://dotnetjunkies.com/WebLog/saravana/
www.ExtremeExperts.com
"Mick" <sa****@libertysurf.fr> wrote in message
news:41***********************@news.free.fr...
Hi,
Got a repeater which display question answers and which contains a
placeholder.
In the ItemDataBound Event, I insert a Radio Button for each answer and set their GroupName with the Question Id.
Anyway, when I display my aspx page, I can check ALL radio buttons at same
time !

What am I doing wrong?

*****
PlaceHolder plh = (PlaceHolder)CurrentItem.Controls[1];
System.Web.UI.WebControls.RadioButton NewRadio = new RadioButton();

NewRadio.ID="ClientCompanyTestQcmQuestionRadioProp ositon";

NewRadio.GroupName=CurrentP.Question_PropositionPa rent.Id;

NewRadio.Checked= false;

plh.Controls.Add(NewRadio);

*****

Thanks for help ^^


Nov 19 '05 #2
Thks ^^
'll have a look

"Saravana" <sa******@sct.co.in> a écrit dans le message de
news:G6*****************@news.cpqcorp.net...
This is a known bug in asp.net. This problem occurs because the Repeater
server control implements the INamingContainer interface, which requires
that all controls that are nested within it must have a unique name when
rendered in Hypertext Markup Language (HTML). Therefore, the HTML name
attribute of any rendered child server control is unique. For more details, refer this link
http://support.microsoft.com/default...;EN-US;Q316495

Instead of asp.net radion button control, you can use this control
http://www.metabuilders.com/Tools/Ro...torColumn.aspx

--
Saravana
http://dotnetjunkies.com/WebLog/saravana/
www.ExtremeExperts.com
"Mick" <sa****@libertysurf.fr> wrote in message
news:41***********************@news.free.fr...
Hi,
Got a repeater which display question answers and which contains a
placeholder.
In the ItemDataBound Event, I insert a Radio Button for each answer and

set
their GroupName with the Question Id.
Anyway, when I display my aspx page, I can check ALL radio buttons at same time !

What am I doing wrong?

*****
PlaceHolder plh = (PlaceHolder)CurrentItem.Controls[1];
System.Web.UI.WebControls.RadioButton NewRadio = new RadioButton();

NewRadio.ID="ClientCompanyTestQcmQuestionRadioProp ositon";

NewRadio.GroupName=CurrentP.Question_PropositionPa rent.Id;

NewRadio.Checked= false;

plh.Controls.Add(NewRadio);

*****

Thanks for help ^^



Nov 19 '05 #3

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

Similar topics

3
by: dave | last post by:
I have half a dozen web form radio buttons on a web form. Each of them is set to postback=true. However, if for instance radiobutton1 is already selected and the user selects it again, it performs...
0
by: Alan Samet | last post by:
If you need to get in touch with me, be sure to remove the "newsgroups" from my email address. I've developed a quick-and-dirty workaround for putting System.Web.UI.WebControls.RadioButton...
5
by: chrisfarscape | last post by:
I am having a problem getting my visual studio to recognize my option buttons within a table control. When I place <asp:TableCell> <asp:RadioButton id”test1” Text=”Test”...
3
by: visual2005beta_developer | last post by:
I have the following problem (especially with the groupname-attribut of the RadioButton-Control) when developing in Visual Studio 2005 Beta. I load an ascx-control in an aspx-page. This...
2
by: Alan Silver | last post by:
Hello, I have a pair of radiobuttons on a form, used to select the type of search someone is to do... <asp:RadioButton ID="rdbLastNDays" Text="Show tips for the last" GroupName="rbgSearch"...
1
by: Vikas Kumar | last post by:
Hi Guys, Can I hav image with radiobuttonlist control instead of text....? Pls help me in this concern...
2
by: Velislav | last post by:
Hi, I've got 9 RadioButton's in a TableLayoutPanel container They all need to be in the same group, but 2 of them are in FlowLayoutPanel containers within the cells of the TableLayoutPanel,...
5
by: techvaibhav | last post by:
Hello everyone i am stuck in a very annoying problem.Hope you guys help me fix this out. I am displaying questions form a Question database along with its options. Options can be controlled by...
2
by: Mufasa | last post by:
How can I make an asp:radiobutton where when the user selects it it runs javascript code? I've tried doing the following but it doesn't seem to work: ...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: 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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...

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.