473,503 Members | 9,057 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Radio Buttons in Repeater Control

I know this is probably pretty trival.
I am trying to put a radio button inside
a repeater control. That will allow me to select each row one by one. Then
once the user clicks on the submit button. It determines which row has been
selected.

Can anyone post me a code sample.

Thanks,
Mark

Nov 19 '05 #1
1 2121
you put a radio button in it like you normally would <asp:radiobutton
id="choice" .. /> in the item template.

Then in the button's click, you can look through the repeater's Items
collection and do a findControl.. Here is some quasi pseudo (As it probably
won't work as-is)

for each item as RepeaterItem in myRepeater.Items
dim rad as RadioButton = ctype(item.FindControl("choice"), RadioButton)
if rad.Selected = true then
'item is checked, do something, you can use item to figure out which
row it was..
end if
next

Karl
--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
"SouthSpawn" <so********@aol.com> wrote in message
news:c5******************************@localhost.ta lkaboutsoftware.com...
I know this is probably pretty trival.
I am trying to put a radio button inside
a repeater control. That will allow me to select each row one by one. Then
once the user clicks on the submit button. It determines which row has
been
selected.

Can anyone post me a code sample.

Thanks,
Mark

Nov 19 '05 #2

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

Similar topics

3
2274
by: Jay | last post by:
I noticed somewhere on the net that a post mentioned that there was a bug in the datagrid, radio buttons and a repeater. Something about the radio buttons are not mutually exclusive. (will this be...
3
5930
by: David Hearn | last post by:
I have a datalist that I have inserted a radio button into. The datalist populates with a list of items and each one has a radio button next to it. I need to use the radio button to allow the user...
2
1686
by: Wayne Sepega | last post by:
I have the following Code: foreach (MyClass d in myClassCollection) { curRadioBtn = new RadioButton(); curRadioBtn.Text = d.ToString(); curRadioBtn.GroupName = "Contact"; curRadioBtn.ID =...
0
1274
by: sloan | last post by:
http://support.microsoft.com/default.aspx?scid=kb;EN-US;316495 Radio Buttons Are Not Mutually Exclusive When Used in a Repeater Server Control ... Has 2.0 fixed this bug ?
0
1260
by: sloan | last post by:
BUG: Radio Buttons Are Not Mutually Exclusive When Used in a Repeater Server Control http://support.microsoft.com/default.aspx?scid=kb;EN-US;316495 I programmed up a pretty simple page in 2.0. ...
6
1584
by: Totto | last post by:
Hi, Anyone know the best solution to dynamically add buttons to a asp 2.0 page using data from Sql server? Are there any contols suitable for this or is it best to iterate the dataset and...
4
2503
by: Blasting Cap | last post by:
I have a page that has a number of radio buttons that will be displayed to different access levels of a user who logs in to my website. For instance, if there are a dozen buttons, user1 will see...
4
5675
by: CURTISLESPERANCE | last post by:
Hi, I am trying to figure out if this is possible. I need to display 4 radio buttons next to a question then 3 radio buttons after. The 2 different group radio buttons and questions are coming from...
7
2716
iam_clint
by: iam_clint | last post by:
Alright I have a page that I have multiple radio buttons being drawn to the page reading from the database. Example Permissions Google - ( ) on (x ) off Nvidia - ( ) on (x ) off Newegg- (...
0
7193
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
7264
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,...
1
6975
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5562
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,...
0
4666
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3160
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1495
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
728
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
371
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.