The reason you're getting the syntax error is because you haven't enclosed the value you're passing as a parameter in quotes.
You come from a classic ASP background don't you.
There is an
ASP.NET CheckBoxList control that I think you'll be interested in.
If you use an ASP.NET CheckBoxList control (instead of the HTML input type=checkbox elemetn) you can access it in your VB.NET code.
For example, if you wanted to check (in your server code) if any of the checkboxes were checked in the CheckBoxList you would check to see if the SelectedIndex property was greater than 0:
-
-
If CheckBoxList1.SelectedIndex > 0 Then
-
'A checkbox was checked, it returns -1 if none were checked
-
End If
So, that's how you would check server side if any of the CheckBoxes in a CheckBoxList control were checked.
If you want to validate client side it's a little trickier. But first thing's first: if you want to use ASP.NET, then strongly consider using the features that it provides you with.
-Frinny