Skip to content
Register
Login
Home
iFinity
Home
Services
Software Development
Website Development
DotNetNuke Consulting
Contracting Work
Products
Url Master
Product Details
Reviews and Testimonials
Pricing and Licences
FAQ
Downloads
Blog Module Url Provider
News Articles Url Provider
Tagger
FAQ
Downloads
Product Details
Instruction Video
Free Downloads
Inline Link Master
Product Details
FAQ
Support Forums
Knowledge Base
Url Master
News Articles Friendly Url Provider
Tagger
Contact
Blog
Licensing
Support
iFinity Blogs
Search
Simple fix for Radio Button controls in an ASP.NET Repeater using jQuery
By Bruce Chapman on
Tuesday, April 13, 2010 9:26 AM
I’ve come across this problem a few times, and have usually just worked my way around it.
The problem is when you want to create a list of Radio Buttons to display on a page, and you need to show these with other data, using an ASP.NET repeater (or DataList, or DataGrid).
Here’s what your code might look like:
If you run a DataBind to show values for this repeater, the Html will end up something like this:
One name="rptValues$ctl01$options" /> name="rptValues$ctl01$txtValue" />
Two name="rptValues$ctl02$options" /> name="rptValues$ctl02$txtValue" />
(Note I haven’t shown the ‘code behind’ here, just take it that I have bound to a string list which consists of ‘one’ and ‘two’)
Because the two ‘radio’ inputs have a different ‘name’ attribute, then they will act independently of each other, and you’ll be...
Read More »
Comments (6)
Crafty Code
Hi, I'm Bruce Chapman, and this is my blog. You'll find lots of information here - my thoughts about business and the internet, technical information, things I'm working on and the odd strange post or two.
Share this
Get more!
Subscribe to the Mailing List
Email Address:
First Name:
Last Name:
You will be sent a confirmation upon subscription
Follow me on Twitter
Follow @brucerchapman
Stack Exchange
Klout Profile
Page Tags
301
content
domain
DotNetNuke
Duplicate
Redirects
Archive
<
April 2010
>
Sun
Mon
Tue
Wed
Thu
Fri
Sat
28
29
30
31
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
1
2
3
4
5
6
7
8
Monthly
January, 2012 (1)
December, 2011 (3)
November, 2011 (5)
October, 2011 (7)
September, 2011 (2)
July, 2011 (6)
June, 2011 (2)
May, 2011 (1)
March, 2011 (3)
February, 2011 (2)
January, 2011 (3)
December, 2010 (1)
November, 2010 (4)
October, 2010 (2)
September, 2010 (2)
August, 2010 (2)
July, 2010 (1)
June, 2010 (4)
May, 2010 (2)
April, 2010 (1)
March, 2010 (3)
February, 2010 (3)
January, 2010 (4)
December, 2009 (1)
October, 2009 (1)
September, 2009 (3)
August, 2009 (1)
July, 2009 (2)
June, 2009 (3)
May, 2009 (3)
April, 2009 (1)
March, 2009 (2)
February, 2009 (3)
January, 2009 (2)
November, 2008 (4)
October, 2008 (2)
August, 2008 (2)
July, 2008 (2)
June, 2008 (3)
May, 2008 (2)
April, 2008 (3)
March, 2008 (5)
February, 2008 (5)
September, 2007 (1)
August, 2007 (2)
July, 2007 (1)
June, 2007 (1)
November, 2006 (1)
October, 2006 (4)
August, 2006 (1)
July, 2006 (1)
June, 2006 (3)
Go
All Blogs
Bruce's Blog
Crafty Code
Keywords
Phrase