select at least one checkbox out of 3 required field validator

alimalik

New Member
I am trying to make my code to put required field validator so at least one checkbox will be selected out of three. This is my code:\[code\]<div class="left marginT5 marginR10"> <input type="checkbox" id="chk1" value="http://stackoverflow.com/questions/15796984/option1" runat="server" class="styled" /> Choice1 </div> <div class="left marginT5 marginR10"><input type="checkbox" id="chk2" value="http://stackoverflow.com/questions/15796984/option2" runat="server" class="styled" /> Choice2 </div> <div class="left marginT5 marginR10"> <input type="checkbox" id="chk3" value="http://stackoverflow.com/questions/15796984/option3" runat="server" class="styled" /> Choice3 </div>\[/code\]I know I can use checkboxlist but because of design issues I can only use single checkbox controls. Any idea how I can "force" the user to select at least one checkbox?Thanks in advance, Laziale
 
Back
Top