[thelist] (ASP.NET): Grouping radio buttons in a repeater.

Tab Alleman talleman at Lumpsum.com
Thu Feb 16 13:19:15 CST 2006

Thanks, Googling has led me to solutions involving creating custom objects, which might be fun, but for now I'm going with a regular client-side html button,  in a server-object table cell.  When I want to programmatically mark the radio button as checked, I manipulate the InnerHTML of the table cell.  heh... squirrely, but it works like a charm.

> -----Original Message-----
> From: thelist-bounces at lists.evolt.org
> [mailto:thelist-bounces at lists.evolt.org]On Behalf Of Peter Brunone
> (EasyListBox.com)
> Sent: Thursday, February 16, 2006 1:32 PM
> To: thelist at lists.evolt.org; thelist at lists.evolt.org
> Subject: Re: [thelist] (ASP.NET): Grouping radio buttons in a 
> repeater.
>    If you plan to use a group, or anything with 
> runat="server", your only option will be to go through and 
> change the names client-side (myTable.getElementsByTagName 
> should get you started in the right direction).  Of course 
> this could mess things up in Viewstate when you post back, 
> which at best would have you using Request.Form to retrieve 
> the value... and at worst would throw a yellow barf screen error.
> FWIW...
> Peter
>  From: "Tab Alleman" talleman at Lumpsum.com
> I have a repeater that creates one radio button for every 
> item. I want these radio buttons grouped together so that 
> only one of them can be selected.
> In my repeater, I specify this:
> rbPhonePrimary.GroupName = "rbgPhonePrimary"
> but when it produces the page, the radio buttons get names like this:
> name="rptPhone:_ctl0:rbgPhonePrimary"
> name="rptPhone:_ctl1:rbgPhonePrimary"
> name="rptPhone:_ctl2:rbgPhonePrimary"
> etc...
> Is there any way to get what I want here?
> -- 
> * * Please support the community that supports you.  * *
> http://evolt.org/help_support_evolt/
> For unsubscribe and other options, including the Tip Harvester 
> and archives of thelist go to: http://lists.evolt.org 
> Workers of the Web, evolt ! 

More information about the thelist mailing list