Jump to content

Radio Buttons dont we just love them :)

- - - - -

  • Please log in to reply
1 reply to this topic

#1
PSmith

PSmith

    Newbie

  • Members
  • Pip
  • 5 posts
Hey there,

I have the following radio buttons i need to know what properties i need to add to make them so if you tic 1 the other de-tics

I did add them all to the same group "name="Group1" but that did not seem to work :)

Or do you have to add the coding to the selected index change?

Thank you for your help

<tr>
<td>
<asp:RadioButtonList ID="rbDebitOrder" name="Group1" runat="server" RepeatDirection="Horizontal"
AutoPostBack="True">
<asp:ListItem>Debit Order</asp:ListItem>
</asp:RadioButtonList>
</td>
<td>
<asp:RadioButtonList ID="rbStopOrder" name="Group1" runat="server" RepeatDirection="Horizontal"
AutoPostBack="True">
<asp:ListItem>Stop Order</asp:ListItem>
</asp:RadioButtonList>
</td>
<td>
<asp:RadioButtonList ID="rbCheque" name="Group1" runat="server" RepeatDirection="Horizontal"
AutoPostBack="True">
<asp:ListItem>Cheque</asp:ListItem>
</asp:RadioButtonList>
</td>
<td>
<asp:RadioButtonList ID="rbInternetBanking" name="Group1" runat="server" RepeatDirection="Horizontal"
AutoPostBack="True">
<asp:ListItem>Internet Banking</asp:ListItem>
</asp:RadioButtonList>
</td>
</tr>

#2
Overkill

Overkill

    Newbie

  • Members
  • PipPip
  • 10 posts
I had the same problem, I added Groupname to the buttons wich only were allowed to have 1 selected.

GroupName="name"

<asp:RadioButton ID="number1" name="Group1" runat="server" GroupName="Groupname1"/>

<asp:RadioButton ID="number2" name="Group2" runat="server" GroupName="Groupname1"/>


Hope it helps :).




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users