Selected item in RadioButtonList

G

Guest

My RadioButtonList has items with similar values. N/A has a value of 0;
Sometimes also has a value of 0; Never has a value of 1, etc.

I'm running into a huge problem in that if the selected item is Sometimes
(which is second in the list), the rbl.SelectedItem.Text property always
returns N/A instead (which is first in the list).

I'm getting a sick feeling that the control is returning the first item with
the value of 0, instead of the one that is really selected. I can't change
the values for these questions to be unique, and I don't want to use separate
radio buttons (I have over 100 questions that are multiple choice answers!).

Can someone help me resolve this? Is there a way to use the rbl with
non-unique values?
 
W

WJ

Richard said:
My RadioButtonList has items with similar values. N/A has a value of 0;
Sometimes also has a value of 0; Never has a value of 1, etc.
You cannot do this. it is not possible in a Radio Button Group, each item
is unique. Because you can select only one item.
Can someone help me resolve this? Is there a way to use the rbl with
non-unique values?

Use Check List istead. This will allow you multiple choices.

John
 
G

Guest

Thanks WJ. A checklist won't work because I don't want to allow multiple
selections (I goofed when I originally used that phrase--I meant that it
would be a lot of work because each question had more than Yes/No options.
The user has to choose only 1 out of 6 items).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,074
Latest member
StanleyFra

Latest Threads

Top