Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <asp:RadioButtonList ID="rblradio" runat="server">
- <asp:ListItem Value="M" Text="Male"></asp:ListItem>
- <asp:ListItem Value="F" Text="Female"></asp:ListItem>
- </asp:RadioButtonList>
- function ValidateAccessLevel() {
- var AccessLevelIndexValue = document.getElementById('<%=rblradio.ClientID%>');
- if (AccessLevelIndexValue.checked)
- {
- return false;
- }
- else
- {
- return true;
- }
- }
- </script>
- <asp:RequiredFieldValidator
- id="radioValidator
- runat="server"
- ControlToValidate="rblradio"
- Display="Dynamic">
- *
- </asp:RequiredFieldValidator>
Add Comment
Please, Sign In to add comment