2
Answers

checkbox list ,requried field validator

erum mirza

erum mirza

13y
3.8k
1

 

 
                if (checkedControls.length > 0) {
                    alert('Valid');
                }
                else {
                    alert('Please select atleast one checkbox');
                }
                return false;
            });
        });
   
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <asp:CheckBoxList RepeatColumns="3" RepeatDirection="Horizontal" ID="CheckBoxList1"
        runat="server">
        <asp:ListItem Value="1">Cutomer Broker</asp:ListItem>
        <asp:ListItem Value="2">N.V.O.C.C</asp:ListItem>
        <asp:ListItem Value="3">Hauloiers</asp:ListItem>
        <asp:ListItem Value="4">Air Freight</asp:ListItem>
        <asp:ListItem Value="5">Sea Freight</asp:ListItem>
        <asp:ListItem Value="6">Supply Chain Management</asp:ListItem>
        <asp:ListItem Value="7">Groupage Services</asp:ListItem>
        <asp:ListItem Value="8">Project Cargo</asp:ListItem>
        <asp:ListItem Value="9">Ware House Operator</asp:ListItem>
    </asp:CheckBoxList>
    <br />
    <asp:Button ID="btnTest" runat="server" Text="Test" />
    </form>
</body>
</html>

 
this code check work fine ,but i have radio button (yes and no) on same .aspx page .if yes(0) and no (1).

i need to check if yes is selected (certain palceholder open that have some controls) i already did .but teh problem is i need to check yes is selected or not for radio buton.

please help me.any urgent reply is higly appreciated
Answers (2)