S
Solveig Osk
back in the "old days" I used to make radio buttons like so
<input type="radio" name="GroupName" value="0">
<input type="radio" name="GroupName" value="1">
<input type="radio" name="GroupName" value="2">
And then when I posted my form I could just check the
value of the variable "GroupName" to see which button was
checked.
Now I am generating a list of radio buttons, and for each
row I would like to know which radiobutton was checked in
that row. Each row is like this:
<asp:RadioButton runat="server" ID="A1"
GroupName="GroupA"/>
<asp:RadioButton runat="server" ID="A2"
GroupName="GroupA"/>
<asp:RadioButton runat="server" ID="A3"
GroupName="GroupA"/>
When I submit my form I would like to somehow find my
RadioButton groups and check which value was selected in
each group. Is this not possible anymore? Because I can't
see no way of setting a "value" to the radio buttons. I
also tried using a RadioButtonGroup but using that I
always have to have some "display value" (my buttons are
not supposed to have any text, just belong to a group and
have a value).
What would you advise me to do ? I think it will be to
heavy to scrool through all the radio buttons and check if
they are "checked" and then check what GroupName is set...
and blah blah... Isn't there any more simple way ?
<input type="radio" name="GroupName" value="0">
<input type="radio" name="GroupName" value="1">
<input type="radio" name="GroupName" value="2">
And then when I posted my form I could just check the
value of the variable "GroupName" to see which button was
checked.
Now I am generating a list of radio buttons, and for each
row I would like to know which radiobutton was checked in
that row. Each row is like this:
<asp:RadioButton runat="server" ID="A1"
GroupName="GroupA"/>
<asp:RadioButton runat="server" ID="A2"
GroupName="GroupA"/>
<asp:RadioButton runat="server" ID="A3"
GroupName="GroupA"/>
When I submit my form I would like to somehow find my
RadioButton groups and check which value was selected in
each group. Is this not possible anymore? Because I can't
see no way of setting a "value" to the radio buttons. I
also tried using a RadioButtonGroup but using that I
always have to have some "display value" (my buttons are
not supposed to have any text, just belong to a group and
have a value).
What would you advise me to do ? I think it will be to
heavy to scrool through all the radio buttons and check if
they are "checked" and then check what GroupName is set...
and blah blah... Isn't there any more simple way ?