Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to validate checkboxlist controls

Status
Not open for further replies.

devondago

Programmer
Jan 22, 2003
38
0
0
US
I have 2 back to back checkboxlist and I need to make sure the user selects one from each list. How can I validate a checkboxlist?
<tr>
<td class="NavyBold">Please Select age group:</td>
<td><asp:checkboxlist id="chkagegrp" Runat="server" RepeatDirection="Horizontal" RepeatColumns="4" AutoPostBack="false">
<asp:ListItem Value="Twenties"></asp:ListItem>
<asp:ListItem Value="Thirties"></asp:ListItem>
<asp:ListItem Value="Forties"></asp:ListItem>
</asp:checkboxlist></td>
</tr>
<tr>
<td class="NavyBold">Please Select A Favorite Sport:</td>
<td><asp:checkboxlist id="chkfavsprt" Runat="server" RepeatDirection="Vertical" RepeatColumns="2" AutoPostBack="false">
<asp:ListItem Value="Tennis"></asp:ListItem>
<asp:ListItem Value="Soccer"></asp:ListItem>
<asp:ListItem Value="Fotball"></asp:ListItem>
</asp:checkboxlist></td>
</tr>
 
sorry, what is a checkboxlist? the code that u have given seems to be asp.net code. run the page, do a view source and give us the html output, maybe then we can write a JS...

Known is handfull, Unknown is worldfull
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top