S
shodson
I have the following code
What's your sport?
<asp:RadioButtonList ID="rblSport" Runat="server">
<asp:ListItem Value="golf">Golf</asp:ListItem>
<asp:ListItem Value="base">Baseball</asp:ListItem>
<asp:ListItem Value="soft">Softball</asp:ListItem>
<asp:ListItem Value="swim">Swimming</asp:ListItem>
<asp:ListItem Value="jfw">Just for Women</asp:ListItem>
</asp:RadioButtonList>
<asp:RequiredFieldValidator ID="reqSport" Runat="server"
ControlToValidate="rblSport" InitialValue="" Display="Static" Text="*"
ErrorMessage="Please select the sport you play" />
So if the user submits this form, and they have not selected a sport,
I'd expect the validator to catch it but it's not.
How can I get my validator to ensure that one of the sport radio
buttons are selected?
I'm using .NET 1.1 on XP Pro SP1
What's your sport?
<asp:RadioButtonList ID="rblSport" Runat="server">
<asp:ListItem Value="golf">Golf</asp:ListItem>
<asp:ListItem Value="base">Baseball</asp:ListItem>
<asp:ListItem Value="soft">Softball</asp:ListItem>
<asp:ListItem Value="swim">Swimming</asp:ListItem>
<asp:ListItem Value="jfw">Just for Women</asp:ListItem>
</asp:RadioButtonList>
<asp:RequiredFieldValidator ID="reqSport" Runat="server"
ControlToValidate="rblSport" InitialValue="" Display="Static" Text="*"
ErrorMessage="Please select the sport you play" />
So if the user submits this form, and they have not selected a sport,
I'd expect the validator to catch it but it's not.
How can I get my validator to ensure that one of the sport radio
buttons are selected?
I'm using .NET 1.1 on XP Pro SP1